Created
March 20, 2013 23:48
-
-
Save bloudermilk/5209554 to your computer and use it in GitHub Desktop.
A simple git workflow
This file contains hidden or 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
# | |
# Starting | |
# | |
# Start a new feature branch | |
git checkout -b my_feature | |
# Make changes | |
# Add/Commit | |
git add . | |
git commit -m "So much awesome stuff" | |
# Push to remote branch | |
git push origin my_feature | |
# | |
# Iterating | |
# | |
# Make more changes | |
# Add/Commit new changes | |
git add . | |
git commit -m "Even more awesome stuff" | |
# Download all remote changes on all branches | |
git fetch | |
# Rebase any changes from master | |
git rebase origin master | |
# Push to remote (must force since we're rewritten history by rebasing master | |
git push --force origin my_feature | |
# | |
# Merging | |
# | |
# Get all the remote branch | |
git fetch | |
# Checkout master | |
git checkout master | |
# Merge feature | |
git merge origin/my_feature | |
# Push to remote | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment