This gets really annoying as it complains in many cases that it cannot
find a match for the pattern when the pager is used for other things
than commits.
Move `git-track` into its own autoloadable function.
This way it is
better maintainable as in one-liner format and brings the possibility of
having more complexity (e.g. for better portability).
By that it is also now executable as `git-track` as well as `git track`
as before.
Fix weird issue that when `column` is used to display the header line,
it is split over two lines sometimes.
```
local
remote
origin/HEAD
dev origin/dev
main origin/main
origin/utils
```
The alias now lists all local *and* all remote branches and displays how
they are linked.
The `sort -uk1,1` deletes all duplicate entries of remote branches as
they could be listed as %(upstream) as well as %(refname) through the
`refs/remotes/`.
TODO:
This deletes too many entries when multiple local branches track
the same remote branch. (Why ever you should do that...)
I guess this could be resolved by using `awk` for the uniqueness.
Push current branch to branch of same name.
This is useful for new branches as I almost always push those with:
```
git push -u origin "$(git branch --show-current)"
```
The changes are only shown in the editor and do not land in the final
commit message.
For that setting the git-commit-last-msg function and the commit-msg
hook had to be updated.
The function is now a standalone function instead of anonymous and
uses every line until the first comment in COMMIT_EDITMSG discarding the
new information too.
The hook breaks now when checking line lengths when the changes start
since for some weird reason they are passed together with the rest of
the message instead of being deleted like the comments.
Jump between file sections and commits by using n and N. Taken from:
https://github.com/so-fancy/diff-so-fancy/blob/eef379ee43f86/pro-tips.md
Remove FX flags since they are incompatible with the pattern search:
When showing a small change that fits on less than the screen height,
the rest of the screen is filled with ~ lines instead of quitting the
pager. This behaviour is annoying and thus the flags are deactivated.
Since git adds them per default they have to be explicitly disabled.
Use Github credentials when in Projects/github folder.
All other custom github projects are stored in user.config.
Use 8 spaces for tabs to see whitespace error in git diffs.