Skip to content

Instantly share code, notes, and snippets.

@skoshy
Last active August 26, 2018 13:58
Show Gist options
  • Save skoshy/8b9e5c8441e605316012319731aeb9de to your computer and use it in GitHub Desktop.
Save skoshy/8b9e5c8441e605316012319731aeb9de to your computer and use it in GitHub Desktop.
My Git Config
[core]
autocrlf = false
eol = lf
[user]
email = [email protected]
name = Stefan Koshy
[alias]
# Thanks to https://gist.github.com/robmiller/6018582 for many of these
# Basic
st = status
hist = log --pretty = format:'%h %ad | %s%d [%an]' --graph --date = short
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
# Pull from origin/master into branch
pull-master = "pull origin master"
# To remove things from worktree - see https: //medium.com/@igloude/git-skip-worktree-and-how-i-used-to-hate-config-files-e84a44a8c859
# If the files/folder isn't in the worktree, you may want to do a local .gitignore instead via .git/info/exclude. See https://stackoverflow.com/a/1753078/506913
worktree-skip = "update-index --skip-worktree"
worktree-add = "update-index --no-skip-worktree"
worktree-skip-list = "!git ls-files -v|grep '^S'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment