Skip to content

Instantly share code, notes, and snippets.

@shirbr510
Last active April 11, 2020 15:13
Show Gist options
  • Save shirbr510/c2dbfdc0e1e0b211747ab2376ece43c1 to your computer and use it in GitHub Desktop.
Save shirbr510/c2dbfdc0e1e0b211747ab2376ece43c1 to your computer and use it in GitHub Desktop.
My Personal Collection of git aliases
[user]
name = Shir Brass
email = <My Email>
[credential]
helper = cache --timeout=30000
[core]
editor = vim
[alias]
graph = log --oneline --graph --decorate --all
prune-branches = fetch --prune
co = checkout
delete-branch = branch -D
delete-local-branches = "!f(){ git branch | grep -v master | xargs git branch -D; };f"
squash-all = "!f(){ git reset $(git commit-tree HEAD^{tree} -m \"${1:-Initial Commit}\");};f"
fresh = "!f(){ git checkout $1 && git prune-branches && git delete-local-branches && git pull; };f"
rebase-from = "!f(){ git checkout $1 && git pull && git checkout @{-1} && git rebase $1; };f"
@shirbr510
Copy link
Author

included core & credential sections

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