Skip to content

Instantly share code, notes, and snippets.

@kyktommy
Created December 22, 2012 04:06
Show Gist options
  • Save kyktommy/4357450 to your computer and use it in GitHub Desktop.
Save kyktommy/4357450 to your computer and use it in GitHub Desktop.
Try Git Notes
# local
git init
git status
git add .
git commit -m "add *"
git log
git rm '*.txt'
#remote
git remot­e add origi­n git@g­ithub.com:­kyktommy/t­ry_git.git
git push -u origin # -u for remember parameter; `git push`
git pull origin master
git diff HEAD
git diff --staged
git reset foo.txt # unstage foo.txt
git checkout -- <target>
# Branch
git branch clean_up # new clean_up branch
git branch # show all branch
git checkout clean_up # switch to clean_up branch
git branch -d clean_up # delete
# swtich to master, merge with clean_up
git checkout maseter; git merge clean_up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment