From 2ba32daa2a1b91bb015564f467e31e5cf8125ee2 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Mon, 13 May 2024 09:25:33 +0200 Subject: [PATCH] git: add some more tricks some came from https://blog.gitbutler.com/git-tips-and-tricks/ --- .gitconfig | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index c19d900..5369ec8 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,3 +1,4 @@ +# some tricks come from https://blog.gitbutler.com/git-tips-and-tricks/ [user] name = Mathieu Maret email = mathieu.maret@gmail.com @@ -11,6 +12,7 @@ [alias] st = status ci = commit + cm = commit -m cia = commit --amend cias = commit --amend --no-edit co = checkout @@ -70,13 +72,19 @@ up = pull --rebase --autostash rebaseour = "rebase -Xours" rank = "shortlog -s -n --no-merges" - root = rev-parse --show-toplevel + root = rev-parse --show-toplevel + staash = stash --all +# -w ignore whitespace. -C 3 time, detect lines moved or copied in any commit + blamef = blame -w -C -C -C +# Show the log having the modificatoin for $1 + search =!sh -c "git log -S $1 -p" [rebase] # when rebasing, update the other common branch too. # See https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/ # Need git 2.38 updateRefs = true [branch] + sort = -committerdate #New branch track remote #autosetupmerge = always # Rebase on git pull @@ -157,3 +165,14 @@ ff = only [commit] verbose = true +[column] + ui = auto +[gpg] + #Sign with ssh key (check signingkey) + format = ssh +[maintenance] + # start maintenance on a repo with git maintenance start + #repo = /home/mmaret/Sources/matos +[fetch] + #For large repo. Update the commit crash at each commit to have git log --graph super fast + #writeCommitGraph = true