Skip to content

Commit

Permalink
More git settings (#344)
Browse files Browse the repository at this point in the history
* Ensure to always prune remote when fetching

* Always update refs when rebasing

* Always setup remote on push + always use force if includes

This ensures safer force pushing
  • Loading branch information
francishamel authored Dec 14, 2024
1 parent 4c45cfa commit c13eb53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions home-manager/modules/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@
};
enable = true;
extraConfig = {
fetch.prune = true;
init.defaultBranch = "main";
merge.conflictstyle = "zdiff3";
pull.rebase = true;
push = {
autoSetupRemote = true;
useForceIfIncludes = true;
};
rebase = {
autoStash = true;
autosquash = true;
updateRefs = true;
};
rerere.enabled = true;
};
Expand Down

0 comments on commit c13eb53

Please sign in to comment.