Skip to content

Instantly share code, notes, and snippets.

@bplaat
Last active January 19, 2025 20:43
Show Gist options
  • Save bplaat/4a09959df746208466f5e83d924c3361 to your computer and use it in GitHub Desktop.
Save bplaat/4a09959df746208466f5e83d924c3361 to your computer and use it in GitHub Desktop.
Bassie's gitconfig
[user]
name = Bastiaan van der Plaat
email = [email protected]
[core]
autocrlf = false
editor = nano
[help]
autocorrect = prompt
[fetch]
prune = true
[alias]
# Force push
pushf = push --force-with-lease
# Log in a single-line format
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# Sync master branch with upstream remote master
sync = "!f() { \
main_branch=`git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'`; \
git checkout $main_branch && git pull -r upstream $main_branch; \
}; f"
# Get random fixme
fixme = "!f() { git grep -Ein '(FIXME|TODO)' | shuf -n1; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment