Skip to content

Instantly share code, notes, and snippets.

@gryte
Last active February 26, 2019 09:44
Show Gist options
  • Save gryte/33792ed7366d4e0dd29931f2a8931a79 to your computer and use it in GitHub Desktop.
Save gryte/33792ed7366d4e0dd29931f2a8931a79 to your computer and use it in GitHub Desktop.
Git Flow

Your workflow should be:

git pull origin master # get the latest merged code
git checkout -b al-uber-cool-feature # create a feature branch
<code code code> # only one thing at a time!!
<test test test>
git add <filespec> # add the files you changed
git commit -sm "What I changed"
git push

often, but not on every commit:

git checkout master
git pull origin master
git checkout al-uber-cool-feature
git merge master
<test test test>
git commit -sm "Merge upstream updates"
git push

release time!

git checkout master
git pull
git merge al-uber-cool-feature
<test test test>
git push origin master
git branch -d al-uber-cool-feature #delete local branch
git push origin :al-uber-cool-feature #clean up refs on server
@gryte
Copy link
Author

gryte commented Oct 26, 2016

I captured this flow after a conversation with Nathan Cerny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment