Skip to content

Instantly share code, notes, and snippets.

@cijagani
Forked from sarthaksavvy/.gitconfig
Created August 16, 2020 12:47
Show Gist options
  • Save cijagani/400ea777f3fb70fd6ccfc181924e2257 to your computer and use it in GitHub Desktop.
Save cijagani/400ea777f3fb70fd6ccfc181924e2257 to your computer and use it in GitHub Desktop.
Git configuration
[alias]
acm = "!f() { git add . && git commit -m \"$(echo $@)\"; }; f";
com = checkout master
cob = checkout -b
b = branch
p = push
pl = pull
s = status
# Undo a `git push`
undopush = push -f origin HEAD^:master;
# Undo merge
undomerge = reset --hard HEAD@{1};
# Undo changes not commited
undo = reset --hard;
# Undo last commit and remove from stage
# Example
# git unstage file1 file2 ...
unstage = reset HEAD -- #file;
[user]
name = sarthaksavvy
email = bitfumes@gmail.com
[core]
ignorecase = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment