Skip to content

Instantly share code, notes, and snippets.

@sarthaksavvy
Last active September 15, 2021 19:21
Show Gist options
  • Save sarthaksavvy/3016900433910b32043c219cd341afda to your computer and use it in GitHub Desktop.
Save sarthaksavvy/3016900433910b32043c219cd341afda 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