Skip to content

Instantly share code, notes, and snippets.

@pishchalnikov
Last active February 17, 2019 12:34
Show Gist options
  • Save pishchalnikov/1a834e78179733f53c5a68e1019c1026 to your computer and use it in GitHub Desktop.
Save pishchalnikov/1a834e78179733f53c5a68e1019c1026 to your computer and use it in GitHub Desktop.
$ git config --global alias.st 'status -sb'
$ git st
$ git config --global alias.amend 'commit --amend -C HEAD'
$ git amend
$ git config --global alias.undo 'reset --soft HEAD^'
$ git undo
$ git config --global alias.change 'diff --word-diff'
$ git change
$ git config --global alias.hist "log --pretty=format:'%Cred%h%Creset %ad | %Cgreen%s%d%Creset [%an]' --graph --date=short"
$ git hist
# In .bashrc or .profile:
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
$ (develop *$):
$ git remote set-url origin git://new.url.here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment