-
Notifications
You must be signed in to change notification settings - Fork 34
Development Setup and Process
For development, we follow the Gitflow process and use Hub Flow to help with this.
For more information about the Gitflow process, go to this link here: Gitflow for Github
Option 1: git cherry-pick
The cherry-pick option lets you pull all changes in a commit from any branch in your current branch. The only scary thing with this is that all files from that commit are immediately committed to your current branch (i.e. no staging). Here is the workflow:
- first make changes to the release branch
git checkout release/v0.1
<...make changes to files...>
git add <files>
git commit -m "Updates"
[release/v0.1 f2c7e1a] Updates <<< REMEMBER THE COMMIT ID: f2c7e1a
- now add the commit from release to develop
git checkout develop
git cherry-pick f2c7e1a
[develop b298c99] Updates <<< THE COMMIT WAS APPLIED TO develop...DONE!
git push
This option is safer because any files you checkout are added to the staging area, which lets you make changes to them before committing. The downside is that it's more manual in that you need to specify each file you want to checkout. Here is the workflow:
- make changes on release/v0.1 branch
git checkout release/v0.1
<...make changes to README.md...>
git add README.md
git commit -m "Update docs"
- pull changes from release/v0.1 into develop
git checkout develop
git checkout release/v0.1 -- README.md <<< THE CHANGED FILE IS NOW IN THE develop BRANCH
git add README.md
git commit -m "Update develop docs"
git push