Closed Pxtl closed 1 year ago
In the mean time you can use something like this: git push -u origin (git rev-parse --abbrev-ref HEAD)
every time I push a new branch, I do
git push -u origin (Get-GitBranch)
In the mean time you can use something like this: git push -u origin (git rev-parse --abbrev-ref HEAD)
Even better: git push -u origin HEAD
!
# pnb = push new branch
git config --global alias.pnb "push -u origin HEAD"
Removing Get-GitBranch
was part of a deliberate effort (https://github.com/dahlbyk/posh-git/pull/427) to reduce posh-git's surface area to tab expansion + prompt. You could use If you want PowerShell functions for Git, check out https://github.com/PoshCode/PSGit.
System Details
Issue Description
The commandlet Get-GitBranch has been removed from the Posh-Git exported commands list. It's still present in the repo utils but has been left out of the export script. Get-GitBranch is very useful to my workflow -- every time I push a new branch, I do
git push -u origin (Get-GitBranch)
Can this be resurrected? Otherwise is there a powershell module I should be using instead?