Skip to content

Instantly share code, notes, and snippets.

@ndelage
Last active August 29, 2015 14:10
Show Gist options
  • Save ndelage/158e7fdae0f53bc5e11d to your computer and use it in GitHub Desktop.
Save ndelage/158e7fdae0f53bc5e11d to your computer and use it in GitHub Desktop.
Git Workflow

Before starting work on a new story:

git checkout master

Update local master (to match remote master)

git pull

Create a new feature branch

git checkout -b user-model

Do work

                      ___ _ _  _ ____
                       |  | |\/| |___
     ...               |  | |  | |___
   ,'   '.               ___ ____
  ;       ;               |  |  |
  |       |               |  |__|
  |       |         _ _ _ ____ ____ _  _
  | _, ,_ |         | | | |  | |__/ |_/
  '´ | | `'         |_|_| |__| |  \ | \_
     | |    _    _
     | |  .|_|_,' |         ,--.
     | |  |       |        :   |
     | |  `|`'`-._|        :   |
     | |   | |             :   |
     | |   | |             :   |
     | |   | |  .-------.  :   |
     | |   | | ,|   _O  |  :   |
     | |   | | ||_,'    |  :   |
     | |   | | `|       |  ;...:
     | |   | |  |       | /.--. \
     | |  |` |  |       | |'--' |
     '-'  `--'  '-------' '-----'

git commit

Include new stuff from master in your feature branch

Option A: Merge latest master

git fetch git merge master

Option B: Rebase master

git pull --rebase origin master

Push feature branch to origin

git push origin user-model

Create pull request on Github

code review...merge

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