nvim: autoload/git: Set upstream when checking out remote branch

This commit is contained in:
Sanchayan Maity 2022-12-06 19:15:03 +05:30
parent 6529ccae25
commit 4f8f2c8016
1 changed files with 1 additions and 0 deletions

View File

@ -32,6 +32,7 @@ function! git#git_branch_checkout() abort
let remote = join(branch[1:2], "/")
silent execute "keepalt Git checkout " . remote
silent execute "keepalt Git checkout -b " . branch[2]
silent execute "keepalt Git branch --set-upstream-to=" . remote . " " . branch[2]
endif
silent execute "keepalt bw"
endfunction