mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-26 18:08:28 +02:00
feat: git config
This commit is contained in:
@@ -54,10 +54,15 @@
|
|||||||
# signByDefault = true;
|
# signByDefault = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
# A syntax-highlighting pager in Rust(2019 ~ Now)
|
||||||
delta = {
|
delta = {
|
||||||
enable = true;
|
enable = true;
|
||||||
options = {
|
options = {
|
||||||
features = "side-by-side";
|
diff-so-fancy = true;
|
||||||
|
line-numbers = true;
|
||||||
|
true-color = "always";
|
||||||
|
# features => named groups of settings, used to keep related settings organized
|
||||||
|
# features = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -71,8 +76,17 @@
|
|||||||
cm = "commit -m"; # commit via `git cm <message>`
|
cm = "commit -m"; # commit via `git cm <message>`
|
||||||
ca = "commit -am"; # commit all changes via `git ca <message>`
|
ca = "commit -am"; # commit all changes via `git ca <message>`
|
||||||
dc = "diff --cached";
|
dc = "diff --cached";
|
||||||
|
|
||||||
amend = "commit --amend -m"; # amend commit message via `git amend <message>`
|
amend = "commit --amend -m"; # amend commit message via `git amend <message>`
|
||||||
unstage = "reset HEAD --"; # unstage file via `git unstage <file>`
|
unstage = "reset HEAD --"; # unstage file via `git unstage <file>`
|
||||||
|
merged = "branch --merged"; # list merged(into HEAD) branches via `git merged`
|
||||||
|
unmerged = "branch --no-merged"; # list unmerged(into HEAD) branches via `git unmerged`
|
||||||
|
nonexist = "remote prune origin --dry-run"; # list non-exist(remote) branches via `git nonexist`
|
||||||
|
|
||||||
|
# delete merged branches except master & dev & staging
|
||||||
|
delmerged = "! git branch --merged | grep -v '(^\*|main|master|dev|staging)' | xargs git branch -d";
|
||||||
|
# delete non-exist(remote) branches
|
||||||
|
delnonexist = "remote prune origin";
|
||||||
|
|
||||||
# aliases for submodule
|
# aliases for submodule
|
||||||
update = "submodule update --init --recursive";
|
update = "submodule update --init --recursive";
|
||||||
|
|||||||
Reference in New Issue
Block a user