diff options
author | Patrick Spek <p.spek@tyil.nl> | 2023-07-26 13:52:31 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2023-07-26 13:53:51 +0200 |
commit | 76ea0c5bc771ee5f09ef9c2cb90ea5e39323e96b (patch) | |
tree | c2b67d5d24e2d7d9ff2a769b5101b4c917793e23 | |
parent | 8921cc951d60ce0cd280d79f29b6d838f7e15378 (diff) |
Add squash-all command to git
This simple command squashes the entire history into a single commit.
-rw-r--r-- | .config/git/config | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/.config/git/config b/.config/git/config index 6456797..9b641e7 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,26 +1,27 @@ [alias] - a = add - b = branch - bc = branch-cleanup - c = commit - ca = commit --amend --reset-author - co = checkout - cob = checkout -b - ct = tag -s - d = diff - fo = fetch origin - l = log --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%C(6)%ad %C(3)%h%Creset %s %C(7)by %C(2)%ae%C(7):%C(5)%G?' - lg = log --graph --abbrev-commit --decorate --date=relative --all + a = add + b = branch + bc = branch-cleanup + c = commit + ca = commit --amend --reset-author + co = checkout + cob = checkout -b + ct = tag -s + d = diff + fo = fetch origin + l = log --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%C(6)%ad %C(3)%h%Creset %s %C(7)by %C(2)%ae%C(7):%C(5)%G?' + lg = log --graph --abbrev-commit --decorate --date=relative --all mirror-add = ! git remote set-url --add --push origin - p = push - pa = push-all - prev = ! git show "HEAD:$1" - r = rebase --rebase-merges -i - ra = commit --amend --no-edit -a - rc = rebase --continue - s = status -s - t = tag --sort=-v:refname - tr = for-each-ref --sort=taggerdate --format '%(tag)' refs/tags + p = push + pa = push-all + prev = ! git show "HEAD:$1" + r = rebase --rebase-merges -i + ra = commit --amend --no-edit -a + rc = rebase --continue + s = status -s + squash-all = "!f(){ git reset $(git commit-tree HEAD^{tree} \"$@\");};f" + t = tag --sort=-v:refname + tr = for-each-ref --sort=taggerdate --format '%(tag)' refs/tags #[commit] # gpgsign = true |