Commit Graph

124 Commits

Author SHA1 Message Date
126ccb0c7a git: Fix option capitalization
Semantically this changes nothing, but the name with a capital `S` is
used by git-config(1).
2025-09-12 17:04:49 +02:00
dadf344f2b git: Explicitly set core.whitespace.tabwidth=8 2025-09-12 17:03:53 +02:00
f17cde7943 git: Show all refs as decoration in logs 2025-09-12 16:57:00 +02:00
a89ad407ba git: Make all graph colors bold
This looks a bit better in my opinion.
2025-09-12 16:56:05 +02:00
a26a899213 git: Make all bold colors bright
Make all bold colors (also) bright, since kitty does not render bold
colors in their bright version, but I've gotten used to how this looks.

For the graph I've gotten rid of the boldness and only switched to
bright versions since I think it makes no sense to have different line
weights for the branches (Although I apparently never noticed, so I
can't say that this was misleading in practice).
2025-09-12 16:51:36 +02:00
6db1a710c6 git: Rename zsh-autoload.sh -> external-script.sh
With the last commit 9c1e3f4679 (git:zsh-autoload: Use relative
scripts/ folder, 2025-09-12), `zsh-autoload.sh` could execute any type
of external script. Rename it to a more generic name.
2025-09-12 16:25:39 +02:00
bb7ef3769d git: Add branch-rename
Small script to rename a branch locally and on a given remote.
2025-09-12 14:35:44 +02:00
a49cbcae21 git:core.pager: Remove --quit-if-one-screen
The inconsistency annoys me.
2025-09-03 10:02:06 +02:00
9271a293cb git: Enable clone.filterSubmodules
> If a partial clone filter is provided (see --filter in
> git-rev-list(1)) and --recurse-submodules is used, also apply the
> filter to submodules.

I have never used --filter before, but it sounds as if I want this
enabled in the case that I do.
2025-09-03 10:00:48 +02:00
2e4086500d git: Disable rerere
I had this change sitting around so long that I forgot why exactly I
disabled it, but know that some problem arose from rerere. I think that
even though it is super cool, it brings a sneaky new layer of possible
errors. Maybe I'll re-enable it in the future.
2025-09-03 09:53:54 +02:00
151ae41b5c git: Add cont alias for continue 2025-06-24 00:17:15 +02:00
740c0b2fd7 git: Add git-abort & git-continue
I find typing `git {rebase,merge,...} --{continue,abort}` a bit
annoying, since it is a lot of typing. I have added an alias for `rebase
--continue` (grc), but the problem remained for the other commands.

Add a script that continues or aborts the ongoing process by detecting
it automatically.
2025-06-19 14:03:17 +02:00
3d3ba75abb git: Use commit.template for a 2nd newline
When I write commit messages in vim, I often use gwap to format the
message body. This breaks if there is no empty line between the body and
the following "Please enter the commit message for your changes..."
comment.

So, to not always have to add this empty line first, I use a
commit.template file that simply contains one empty line.
2025-05-28 14:05:39 +02:00
e9f05d5d08 git: Add ls -> ls-files alias 2025-05-23 18:19:38 +02:00
bbc6d5c9e0 git: Fix working directory of shell aliases
In git aliases, shell commands are executed from the top-level directory
of the repo. Because of this, something like `git glog -- file` didn't
work in subdirectories.

Fix this by creating a wrapper script that first changes into
$GIT_PREFIX before executing the script. Since (currently) the only
use-case is to launch the functions in `autoload/git/`, most of the path
could move into the script, making the git config a lot cleaner.
2025-05-23 16:30:58 +02:00
9bf853a8d2 git: Fold sections in vim via modeline 2025-05-23 13:33:02 +02:00
7158abd611 git: Reorder aliases
Bring all blocks together and place shorter alias variants behind longer
ones - ignore the shorter ones in the sorting.

Remove the comment above `autosquash` because the command is fairly
descriptive and it is the only comment and I don't really know how to
format the block then (since the comment is at the very top it looks
like it is for the whole block and I don't want to put a newline behind
`autofixup`).
2025-05-23 13:19:25 +02:00
fc60d4baf3 git: Add fetch-tags-only alias 2025-05-23 13:08:24 +02:00
5b36728e07 git: Add indent-with-non-tab to core.whitespace
The rest was already enabled by default.
2025-04-30 17:03:05 +02:00
99d8b6133c git: Set trailer.where = end
Don't remember why I had to set it, or what problems I had without
(since it should be the default, no?), but does no harm.
2025-03-25 18:13:54 +01:00
f77b7b7ff6 git: Switch back to diff-so-fancy from delta
I'm not happy with the colors and diff-so-fancy is easier, since it's
just shipped with this repo via a submodule.
2025-03-25 18:08:22 +01:00
52264362f3 *: Update email 2025-03-20 23:02:31 +01:00
ca1483052b git: Set filetype in modeline
Github does not highlight syntax otherwise.
2024-11-06 13:29:48 +01:00
d30b102e42 git: Set merge.conflictstyle to diff3
Display original text in addition to changes from both sides.
2024-09-21 00:03:34 +02:00
ea2a02626d git: Test delta as diff-so-fancy replacement
Don't know yet if I like it better
2024-09-21 00:03:01 +02:00
9e19a19f76 git:alias: Fix sorting 2024-09-21 00:02:00 +02:00
7aee885ce8 git:alias: Fix flog -> glog typo
I never really use this but instead `glog` directly, but still.
2024-09-21 00:01:52 +02:00
48d2ccec6c git: Update email address 2024-07-25 22:24:35 +02:00
96de70a433 git:column: Fill columns before rows
This is way easier to parse even if it means that I have to potentially
scroll more.
2024-05-24 10:44:55 +02:00
15af1af190 git: Output in columns
Supported git commands should print their output in columns (e.g.
git-branch).

I am still unsure if I'd like to keep the option to fill rows first. The
default behaviour is columns first and `ls` does this too for example.
But I think that it makes more sense to fill the rows first, especially
with sorting by committerdate to delay the need to scroll as far as
possible.
2024-04-09 15:22:17 +02:00
b6cfd9c74a git: Sort branches by reverse committerdate 2024-04-09 15:22:17 +02:00
fc7aad6c1e git: Set diff.colorMovedWS to ignore-all-space
In addition to `diff.colorMoved` this controls how whitespace changes
should affect the detection of moved lines.
2024-03-07 12:31:14 +01:00
6c545ab8b0 git:alias: Add recommit and last-msg 2024-01-29 04:17:17 +01:00
700c661e04 git:alias: Add clm for commit-last-msg 2024-01-25 17:45:00 +01:00
4fceae683f git: Turn on diff.colorMoved 2023-11-18 13:36:34 +01:00
d38ee159ed git: Add perm-stash to save a stash to a file 2023-07-18 14:30:09 +02:00
3ecea7923a git: Disable renameLimit
I want all the renames pls
2023-07-10 16:33:34 +02:00
c83c793a1a git: Disable fetch.pruneTags
This leads to problems in repositories with multiple remotes that do not
share the same tags. A fetch --all will then fetch and delete a tag at
the same time. Tags are also way less often deleted in my experience so
that an automatic pruning is not necessary.
2023-07-09 00:03:44 +02:00
51249568ce git:interactive.diffFilter: Activate diff-so-fancy
This reverts commit 43bf8801f9.

diff-so-fancy was disabled as the interactive diff-filter in
43bf8801f9 ("git:interactive.diffFilter: Disable diff-so-fancy")
because of the rewrite in C of `git add -p`.

This was fixed in v2.38.0[^1].

[^1]: https://github.com/git/git/blob/v2.38.0/Documentation/RelNotes/2.38.0.txt#L353-L356
2023-02-24 10:45:14 +01:00
05f2857d3c git: Add installation note for Term::ReadKey 2023-02-24 10:22:45 +01:00
25243e5ee6 git:last-changed: Fix execution in subdir
git aliases are executed in the repository root.

Fix the output of git-last-changed by first cd-ing into the current
working directory.
2023-02-13 16:37:05 +01:00
805180be5d git:alias: Reorder auto{squash,fixup}
As the flag is called `--autosquash`, the order makes more sense like
this.
2023-01-17 16:34:05 +01:00
f317ed81c2 git: Add last-changed to mimic github file browser
List all files and directories but include the latest commits date and
subject, similar to the file browser in web-UIs of services like GitHub.
Also sort the entries by the commits date and time to see the most
recent changed files/folders at the bottom.
2023-01-17 01:38:17 +01:00
73c0864c8b git: Add https-and-ssh to setup origin
Sets up origin so that it fetches over https but pushes over ssh. This
way unlocking the ssh key is only needed when really necessary.
2022-12-01 01:27:28 +01:00
d99118646c git:alias: Add more short-hands 2022-10-20 16:40:16 +02:00
861b159c78 git:alias: Add multiple short-hand versions 2022-10-20 16:39:23 +02:00
e15fc71054 zsh,git: Add git-make-fork 2022-10-17 17:28:31 +02:00
0ad0ccb0c8 git: Make commit-last-msg available as alias
Move `git-commit-last-msg` into an autoloadable function. This way it
can also be executed as external script and thus in a git alias. This
makes it additionally possible to call it in vim over fugitive's `:Git`.
2022-08-30 19:52:24 +02:00
43bf8801f9 git:interactive.diffFilter: Disable diff-so-fancy
Disable diff-so-fancy as `interactive.diffFilter` for now, as it is
incompatible with git version `v2.37`.[1]

[1] - https://github.com/so-fancy/diff-so-fancy/issues/437
2022-07-12 21:00:12 +02:00
e949ffefef git: Set interactive.singleKey
In interactive commands, allow the user to provide one-letter input with
a single key (i.e., without hitting enter). Currently this is used by
the --patch mode of git-add(1), git-checkout(1), git-restore(1),
git-commit(1), git-reset(1), and git-stash(1). Note that this setting is
silently ignored if portable keystroke input is not available; requires
the Perl module Term::ReadKey.[1]

[1] - git-config(1)
2022-07-12 21:00:12 +02:00