diff options
| author | nsfisis <nsfisis@gmail.com> | 2021-11-13 11:06:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2021-11-13 11:06:24 +0900 |
| commit | 4cb2a109087addfaf20c5c4f0202f68e3e2c6d88 (patch) | |
| tree | afa810c7792e3c33537bfcab2909d747166959ec | |
| parent | c322e4b23e4de47606345516f8566d0b696983f7 (diff) | |
| download | dotfiles-4cb2a109087addfaf20c5c4f0202f68e3e2c6d88.tar.gz dotfiles-4cb2a109087addfaf20c5c4f0202f68e3e2c6d88.tar.zst dotfiles-4cb2a109087addfaf20c5c4f0202f68e3e2c6d88.zip | |
git: fix alias "m" and "cpickc"
| -rw-r--r-- | .config/git/config | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.config/git/config b/.config/git/config index 22acdc3..e82cf0b 100644 --- a/.config/git/config +++ b/.config/git/config @@ -104,13 +104,19 @@ ri = rebase -i rid = rebase -i develop rc = "!GIT_EDITOR=true git rebase --continue" - m = merge --no-edit + m = "!__fn() { \ + if [[ \"$1\" == --abort ]]; then \ + git merge --abort; \ + else \ + git merge --no-edit \"$@\"; \ + fi; \ + }; __fn" mc = "!GIT_EDITOR=true git merge --continue" mm = mergetool pullu = "!git pull upstream $(git current-branch) --ff" pullo = "!git pull origin $(git current-branch) --ff" pusho = "!git push origin $(git current-branch)" cpick = cherry-pick - cpickc = "!GIT_EDITOR=true cherry-pick --continue" + cpickc = "!GIT_EDITOR=true git cherry-pick --continue" empty = commit --allow-empty last-merge-commit = "!git rev-list --abbrev-commit --merges HEAD | head -n 1" |
