Skip to content

Instantly share code, notes, and snippets.

@ricog
Created January 9, 2012 20:10
Show Gist options
  • Save ricog/1584681 to your computer and use it in GitHub Desktop.
Save ricog/1584681 to your computer and use it in GitHub Desktop.
Better Git Workflow

This describes a fairly simple git workflow where features are developed on descriptively named branches. These branches are pushed to github and merged into master once completed and tested by someone else. This is very similar to github flow.

Committing Changes

  1. Make some changes

  2. Commit to a new descriptively named branch

    git checkout -b new-descriptive-branch git add -p git commit -m 'message here'

  3. Push to origin and add it as a tracking branch

    git push -u origin new-descriptive-branch

Future changes can be pushed without the -u flag

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