Skip to content

Commit 6d3819d

Browse files
committed
✨ finished all the aliases!
1 parent 044c3f4 commit 6d3819d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

aliases/git/git-aliases.nu

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ export def grrm [remote: string] {
174174
git remote remove $remote
175175
}
176176
export alias grs = git restore
177-
export alias grset = git remote set-url
177+
export def grset [remote: string, url: string] {
178+
git remote set-url $remote $url
179+
}
178180
export alias grss = git restore --source
179181
export alias grst = git restore --staged
180182
export alias grt = cd (git rev-parse --show-toplevel or echo .)
@@ -212,18 +214,24 @@ export def gtv [] {
212214
export alias glum = git pull upstream (git_main_branch)
213215

214216
export alias gunignore = git update-index --no-assume-unchanged
215-
export alias gup = git pull --rebase
217+
export def gup [rebase_type: string@"nu-complete git pull rebase"] {
218+
git pull --rebase $rebase_type
219+
}
216220
export alias gupv = git pull --rebase --verbose
217221
export alias gupa = git pull --rebase --autostash
218222
export alias gupav = git pull --rebase --autostash --verbose
219223

220224
export alias gwch = git whatchanged -p --abbrev-commit --pretty=medium
221225

222226
export alias gwt = git worktree
223-
export alias gwta = git worktree add
227+
export def gwta [path: path, branch: string] {
228+
git worktree add $path $branch
229+
}
224230
export alias gwtls = git worktree list
225231
export alias gwtmv = git worktree move
226-
export alias gwtrm = git worktree remove
232+
export def gwtm [worktree: string] {
233+
git worktree remove $worktree
234+
}
227235

228236
export alias gam = git am
229237
export alias gamc = git am --continue

0 commit comments

Comments
 (0)