Last active
February 24, 2016 03:07
-
-
Save jasonhinkle/4fb0155a0c57d4dcb641 to your computer and use it in GitHub Desktop.
Branch 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
# INITIAL SETUP | |
# make sure you are working with the most recent code | |
git pull | |
# create branch & optionally add it to remote origin | |
git checkout -b <branchname> | |
git push -u origin <branchname> | |
# REGULAR WORKFLOW | |
# make changes & do normal add/commit/push workflow, pushing only if a remote branch was created | |
git add . | |
git commit -m "check-in message" | |
git push | |
# FINISH WORK AND MERGE | |
# when ready to merge into master | |
git checkout master | |
git pull | |
git merge <branchname> | |
git push | |
# if necessary to rebase | |
# TODO - write this | |
# CLEANUP OPERATIONS | |
# if necessary to undo a commit: | |
git reset --hard 91c27777543ccfcb03769cdd8f6777df055ef479 | |
git push --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment