Created
January 21, 2011 14:32
-
-
Save wm/789738 to your computer and use it in GitHub Desktop.
My Git Work flow
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
~ $ cd MyProject.git | |
(master) MyProject.git $ git pull # Get main branch up to date | |
(master) MyProject.git $ git checkout -b 100-new-style # create story branch to do development in | |
(100-new-style) MyProject.git $ vim public/stylesheets/main.css # make some modifications | |
(100-new-style) MyProject.git $ vim public/stylesheets/two.css # make some modifications | |
(100-new-style) MyProject.git $ vim public/stylesheets/three.css # make some modifications | |
(100-new-style) MyProject.git $ git add public # Add our changes | |
(100-new-style) MyProject.git $ git commit -m "Re #100. Added border to our pages" # commit local changes | |
(100-new-style) MyProject.git $ git checkout master # change back to main branch | |
(master) MyProject.git $ git pull # Get upstream changes (they will be fast forwarded) | |
(master) MyProject.git $ git checkout 100-new-style # Back to story branch | |
(100-new-style) MyProject.git $ git rebase master # Apply the upstream changes to our branch | |
# Here you can continue to develop on your branch repeating the above process every so often. | |
# Once you are ready to push to the upstream server you should ensure you master is up to date | |
# and has been rebased onto your story branch (as described above) then do the following | |
(100-new-style) MyProject.git $ git checkout master # change back to main branch | |
(master) MyProject.git $ git merge 100-new-style # merge in the changes onto master | |
(master) MyProject.git $ git push # push changes upstream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment