Initial content for page added

Peter Ashford 2018-05-28 00:17:59 -07:00
parent 4240378c4e
commit 2dee4a73f7
2 changed files with 22 additions and 0 deletions

22
Workflow-Create-Branch.md Normal file

@ -0,0 +1,22 @@
# Create a Branch
With small projects, it's possible to develop code as commits directly on the *master* branch. In the ZFS-on-Linux project, that sort of development would create havoc and make it difficult to open a PR or rebase the code. For this reason, development in the ZFS-on-Linux project is done on *topic* branches.
The following commands will perform the required functions:
```
$ cd zfs
$ git fetch upstream master
$ git checkout master
$ git merge upstream/master
$ git branch (topic-branch-name)
$ git checkout (topic-branch-name)
```
1. Navigate to your *local* repository.
1. Fetch the updates from the *upstream* repository.
1. Set the current branch to *master*.
1. Merge the fetched updates into the *local* repository.
1. Create a new *topic* branch on the updated *master* branch. The name of the branch should be either the name of the feature (preferred for development of features) or an indication of the issue being worked on (preferred for bug fixes).
1. Set the current branch to the newly created *topic* branch.
**Pro Tip**: The `git checkout -b (topic-branch-name)` command can be used to create and checkout a new branch with one command.