Last active
December 19, 2015 14:09
-
-
Save mattbornski/5967238 to your computer and use it in GitHub Desktop.
Feature branch workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create feature branch from development branch | |
# Let's start from the most up-to-date version | |
git checkout <develop-branch> | |
git pull | |
# And create a feature branch to do our work out of the way | |
git checkout -b <feature-branch> <develop-branch> | |
# And use it | |
git checkout <feature-branch> | |
# Do work here | |
# ... | |
# Periodically merge in commits from develop branch if your feature takes a while | |
git rebase <develop-branch> | |
# If conflicts arise, resolve them manually, mark them resolved using "git add" and then continue using "git rebase --continue" | |
# Merge feature back into development | |
# First make sure we've pulled in any remote changes | |
git checkout <develop-branch> | |
git pull | |
# Merge the feature into the development branch so everybody can use it | |
git merge --no-ff <feature-branch> | |
# Propagate the change upstream | |
git push origin <develop-branch> | |
# We no longer need the branch | |
git branch -d <feature-branch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment