[TASK] Improve git config
This commit is contained in:
parent
6270603c97
commit
d480b9c328
@ -7,9 +7,18 @@
|
|||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
aliases = {
|
aliases = {
|
||||||
|
# Because I constantly forget how to do this
|
||||||
|
# https://git-scm.com/docs/git-fetch#git-fetch--p
|
||||||
prune = "fetch --prune";
|
prune = "fetch --prune";
|
||||||
|
# Not quite as common as an amend, but still common
|
||||||
|
# https://git-scm.com/docs/git-reset#git-reset-emgitresetemltmodegtltcommitgt
|
||||||
undo = "reset --soft HEAD^";
|
undo = "reset --soft HEAD^";
|
||||||
|
# We wanna grab those pesky un-added files!
|
||||||
|
# https://git-scm.com/docs/git-stash
|
||||||
stash-all = "stash save --include-untracked";
|
stash-all = "stash save --include-untracked";
|
||||||
|
# No need for a GUI - a nice, colorful, graphical representation
|
||||||
|
# https://git-scm.com/docs/git-log
|
||||||
|
# via https://medium.com/@payload.dd/thanks-for-the-git-st-i-will-use-this-4da5839a21a4
|
||||||
graph = "log --graph --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'";
|
graph = "log --graph --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -78,6 +87,8 @@
|
|||||||
fetch.prune = true;
|
fetch.prune = true;
|
||||||
http.sslverify = false;
|
http.sslverify = false;
|
||||||
|
|
||||||
|
include.path = "~/.gitconfig_override";
|
||||||
|
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
|
|
||||||
merge.tool = "vimdiff";
|
merge.tool = "vimdiff";
|
||||||
@ -86,12 +97,19 @@
|
|||||||
pull.rebase = false;
|
pull.rebase = false;
|
||||||
|
|
||||||
push = {
|
push = {
|
||||||
|
# "push the current branch back to the branch whose changes are usually integrated into the current branch"
|
||||||
|
# "refuse to push if the upstream branch’s name is different from the local one"
|
||||||
|
# https://git-scm.com/docs/git-config#git-config-pushdefault
|
||||||
default = "simple";
|
default = "simple";
|
||||||
|
# Because I get sick of telling git to do it manually
|
||||||
|
# https://git-scm.com/docs/git-config#git-config-pushfollowTags
|
||||||
followTags = true;
|
followTags = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
rerere.enabled = 1;
|
rerere.enabled = 1;
|
||||||
|
|
||||||
|
# Sometimes a newly-added folder, since it's only one line in git status, can slip under the radar.
|
||||||
|
# https://git-scm.com/docs/git-config#git-config-statusshowUntrackedFiles
|
||||||
status.showUntrackedFiles = "all";
|
status.showUntrackedFiles = "all";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# /etc/nixos/sebastian.nix
|
# /etc/nixos/users/sebastian.nix
|
||||||
# Benutzer-Konfiguration
|
# Benutzer-Konfiguration
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
@ -30,8 +30,8 @@
|
|||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
settings = {
|
settings = {
|
||||||
user.name = "Sebastian Fischer"; # ANPASSEN
|
user.name = "Sebastian Fischer";
|
||||||
user.email = "typo3@evoweb.de"; # ANPASSEN
|
user.email = "typo3@evoweb.de";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user