- Define a branch and a tag that will be your
long-running-branch
and be stable. (i.e. long-running-branch-stable lrb) - Each developer working on the long running branch should do feature work on their own branch. (ie. robbdempsey/feature2)
- When you are ready to merge changes from a developer feature branch, Get the latest branches and tags from remote
git pull
- When someone else has merged, tagged and pushed to github/stash you will need to pull those changes local
- Merge in your changes
git checkout long-running-branch-stable
git merge --no-ff [my-branch]
- Fix any conflicts and confirm merge works with any tests available
- tag your commit (try to follow semver)
git tag -a lrb-v1.X.X -m 'simple description'
- push your changes
git push origin long-running-branch-stable --follow-tags
`git checkout -b [newbranch] lrb-v1.2.0`
- On your local branch, Commit/Stash your changes
- rebase your local branch from a tag on long-running-branch-stable
git rebase lrb-v1.2.1
git tag --column // list everything in column form
git log --pretty=oneline
git log --decorate --all --oneline — graph
git merge --no-ff [my-branch] // preserves commit history
git push origin --delete <branchName>