git
: the main program.tig
: git viewer.gist
: upload code to GitHub Gist.hub
: integrate GitHub. Can be alias togit
.
Solve conflict by edit manually:
<<<<< HEAD
old code
=====
new
>>>>>
Show diff from last commit:
git diff
Compare file in two branches:
git diff BRANCH..BRANCH FILE
Get changes from a specific commit:
git cherry-pick COMMIT-SHA
Stash:
git stash
git stash list
git stash apply
Ignore files:
.gitignore
Remove file from added:
git rm --cached FILE
Undo last commit without losing changes:
git reset --soft HEAD^
Tab
: switch window.h
: Switch to help view
Associate with GitHub account:
gist --login
Create gists anonymously with -a
.
Create a gist from a file:
gist -d "Description." FILE
Update a gist:
gist -u GIST_ID FILE
Add images to a gist:
- Clone the gist.
- Commit the images.
- Push.
hub browser
: view repo in browser.hub issue
: view issues.