Skip to content

Instantly share code, notes, and snippets.

@aleksblago
Last active September 23, 2024 05:10
Show Gist options
  • Save aleksblago/5977772 to your computer and use it in GitHub Desktop.
Save aleksblago/5977772 to your computer and use it in GitHub Desktop.
Git config settings
[user]
name = Aleks Blagojevich
email =
[alias]
# Lists all local branches
b = branch
# Lists all remote and local branchces
ba = branch -a
c = commit
# Commit with a message
cm = commit -m
co = checkout
d = diff
# Shows me all pending changes
st = status
# Shows me just the tracked files I've modified
stfu = status --untracked=no
# Creates a new branch using the provided name and checks out that newly created branch
nb = checkout -b
# Adds all modified files and then commits them with the provided message
acm = !git add -A && git commit -m
# Gets rid of all changes
bleh = !git reset --hard && git clean -df
# Adds all changed files to the previous commit
amend = !git commit --amend --no-edit
# Brings back the last local commit so you can continue making changes
uncommit = reset --soft HEAD~1
# Stashes everything and include a message
save = stash save --include-untracked
# Applies the most recently saved stash but keep the stash
resume = stash apply
# Shows a list of all currently saved stashes
saved = stash list
# Delete branches
kill = branch -D
# Unstage all staged files
holup = restore --staged .
[push]
default = simple
[core]
autocrlf = false
excludesfile = ~/.gitignore
[credential]
helper = manager
[winUpdater]
recentlySeenVersion = 2.22.0.windows.1
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
[pull]
rebase = false
[init]
defaultBranch = main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment