Skip to content

Instantly share code, notes, and snippets.

@leihuang23
Forked from AdamMarsden/zshgit.md
Created June 26, 2018 06:53
Show Gist options
  • Save leihuang23/fa3ca8e3aeee35c8d3dc8dd204213bd8 to your computer and use it in GitHub Desktop.
Save leihuang23/fa3ca8e3aeee35c8d3dc8dd204213bd8 to your computer and use it in GitHub Desktop.
Oh My Zsh - Git Cheat Sheet

#Oh My Zsh - Git Cheat Sheet

ggit

gstgit status

glgit pull

gupgit pull --rebase

gpgit push

gdgit diff

gdcgit diff --cached

gdvgit diff -w "$@" | view -

gcgit commit -v

gc!git commit -v --amend

gcagit commit -v -a

gca!git commit -v -a --amend

gcmsggit commit -m

gcogit checkout

gcmgit checkout master

grgit remote

grvgit remote -v

grmvgit remote rename

grrmgit remote remove

gsetrgit remote set-url

grupgit remote update

grbigit rebase -i

grbcgit rebase --continue

grbagit rebase --abort

gbgit branch

gbagit branch -a

gcountgit shortlog -sn

gclgit config --list

gcpgit cherry-pick

glggit log --stat --max-count=10

glgggit log --graph --max-count=10

glggagit log --graph --decorate --all

glogit log --oneline --decorate --color

gloggit log --oneline --decorate --color --graph

gssgit status -s

gagit add

gmgit merge

grhgit reset HEAD

grhhgit reset HEAD --hard

gcleangit reset --hard && git clean -dfx

gwcgit whatchanged -p --abbrev-commit --pretty=medium

gstsgit stash show --text

gstagit stash

gstpgit stash pop

gstdgit stash drop

ggpullgit pull origin $(current_branch)

ggpurgit pull --rebase origin $(current_branch)

ggpushgit push origin $(current_branch)

ggpnpgit pull origin $(current_branch) && git push origin $(current_branch)

glp_git_log_prettily

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