Skip to content

Commit ce57d9e

Browse files
feat: cmergeでgit rev-parse --git-dirするようにする
1 parent e510a17 commit ce57d9e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.gitconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
ignore = "!gi() { curl -L -s https://www.gitignore.io/api/$@ >> .gitignore ;}; gi"
3939
change-commits = "!f() { VAR1=$1; VAR='$'$1; OLD=$2; NEW=$3; echo \"Are you sure for replace $VAR $OLD => $NEW ?(Y/N)\";read OK;if [ \"$OK\" = 'Y' ] ; then shift 3; git filter-branch --env-filter \"if [ \\\"${VAR}\\\" = '$OLD' ]; then export $VAR1='$NEW';echo 'to $NEW'; fi\" $@; fi;}; f "
4040
sync = !"f(){ git pull && git push; }; f"
41-
cmerge = !"f(){ echo $1 > .git/cmerge; git merge $1 -m \"merge: $1 -> $(git rev-parse --abbrev-ref HEAD)\"; }; f"
42-
ccmerge = !"f(){ git commit -am \"merge: $(cat .git/cmerge) -> $(git branch --show-current)\"; rm .git/cmerge; }; f"
41+
cmerge = !"f(){ echo $1 > $(git rev-parse --git-dir)/cmerge; git merge $1 -m \"merge: $1 -> $(git rev-parse --abbrev-ref HEAD)\"; }; f"
42+
ccmerge = !"f(){ git commit -am \"merge: $(cat $(git rev-parse --git-dir)/cmerge) -> $(git branch --show-current)\"; rm .git/cmerge; }; f"
4343
undo = reset --soft HEAD~1
4444
amend = "commit --amend --no-edit"
4545
[push]

nushell/config.nu

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ $env.config.keybindings ++= [{
5959
keycode: char_c
6060
event: [{ send: ViChangeMode mode: normal }]
6161
}]
62-
source $"($nu.home-path)/.cargo/env.nu"
6362

6463
alias mr = mise run
6564

0 commit comments

Comments
 (0)