markdown git工作流程

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown git工作流程相关的知识,希望对你有一定的参考价值。

For example, let's start a project based on `inferno-starter` and but host it on bitbucket.

This is similar to the "clone and fork" workflow, however we're not forking, but instead manually creating a repository and adding it as upstream.

```
git clone https://github.com/rolfen/inferno-starter.git
cd inferno-starter
git remote rename origin inferno-starter
```

Create a new repository on bitbucket, then:

```
git remote add origin https://rolfen@bitbucket.org/rolfen/my-new-repo.git
git push -u origin master
```

Have a branch track `inferno-starter`

```
git checkout -b inferno-starter
git branch --set-upstream-to=inferno-starter/master inferno-starter
```
To update the `inferno-starter` remote we can now do the following. It will push the local `inferno-starter` branch into the `master` branch of the `inferno-starter` remote.

```
git push inferno-starter inferno-starter:master
```

Otherwise we work on the project master branch

```
git checkout master
git push
```

Use these to check that everything is wired correctly
```
git remote -vv
git branch -vv
```

以上是关于markdown git工作流程的主要内容,如果未能解决你的问题,请参考以下文章

markdown Git工作流程

markdown 日常工作流程中常见的git命令

markdown 日常工作流程中常见的git命令

markdown 日常工作流程中常见的git命令

markdown git,PR流程

markdown 简化的Git流程