From 2dee4a73f767ed8f11b0b5c897109ccc96c860ef Mon Sep 17 00:00:00 2001 From: Peter Ashford Date: Mon, 28 May 2018 00:17:59 -0700 Subject: [PATCH] Initial content for page added --- Workflow-Create-Branch.md | 22 ++++++++++++++++++++++ Workflow/Create-Branch.md | 0 2 files changed, 22 insertions(+) create mode 100644 Workflow-Create-Branch.md delete mode 100644 Workflow/Create-Branch.md diff --git a/Workflow-Create-Branch.md b/Workflow-Create-Branch.md new file mode 100644 index 0000000..c8fd73d --- /dev/null +++ b/Workflow-Create-Branch.md @@ -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. \ No newline at end of file diff --git a/Workflow/Create-Branch.md b/Workflow/Create-Branch.md deleted file mode 100644 index e69de29..0000000