Skip to content

Instantly share code, notes, and snippets.

View alghanmi's full-sized avatar

Rami AlGhanmi alghanmi

  • University of Southern California
  • Los Angeles, CA
View GitHub Profile
@johnnyjung
johnnyjung / git_cheat_sheet
Created January 21, 2013 20:57
Git Commands Cheat Sheet
Workflow
1) Create private branch off public (remote) branch
2) Regularly commit to this private branch
3) Clean up its history (squash merge, rebase, or merge into a separate temp branch and then merge to master)
4) Merge to origin public (remote) branch
git init (Create a new local repo)
git remote add repo_name ~~~~~~.git (Add a remote repo as a new remote "repo_name")
git clone ~~~~~.git repo_name (Clone a remote repo as "repo_name")