Skip to content

Instantly share code, notes, and snippets.

@ismasan
Created January 24, 2012 11:12
Show Gist options
  • Save ismasan/1669672 to your computer and use it in GitHub Desktop.
Save ismasan/1669672 to your computer and use it in GitHub Desktop.
Simple git workflow
# 1. Pull latest changes from remote repository
$ git pull
# Git will tell you if you have conflict. If so, fix each file individually and commit the fix.
# 2. Starting a new feature
# Create a "feature branch". Each new piece of functionality lives in it's own branch
$ git checkout -b my_new_feature
# 3. Work and commit your changes. Keep commits small and self-contained. Commit messages should be descriptive.
# 4. Go back to "master" and pull latest changes from server
$ git checkout master
$ git pull
# 5. Merge your local feature branch onto master
$ git merge --no-ff my_new_feature
# 6. Fix conflicts, if any. Commit fix.
# 7. Push your changes to remote server
$ git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment