Skip to content

Instantly share code, notes, and snippets.

@bentonporter
Last active January 19, 2016 16:23
Show Gist options
  • Save bentonporter/2891475 to your computer and use it in GitHub Desktop.
Save bentonporter/2891475 to your computer and use it in GitHub Desktop.
Git Commands

Update your fork with latest on master

git checkout master
git pull upstream master
git push origin master

Start a new feature branch

git checkout -b feature-branch
git push -u origin feature-branch

Rebase and squash commits

git checkout master
git pull upstream master
git push origin master
git checkout feature-branch
git rebase master

git reset master
# stage and commit files however you want
git push -f origin feature-branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment