You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Renames local branch master to main
git branch -m master main
git fetch origin
# Set up main to track upstream branch main
git branch -u origin/main main
# Changes default branch be set to main for remote origin
git remote set-head origin --auto
Proposed parameters
Parameter
Mandatory
Data type
Description
Default value
Allowed values
Name
Yes
String
Specifies the current branch name
None
-
NewName
Yes
String
Specifies the branch name to rename to
None
-
RemoteName
No
String
Specifies the remote that has the upstream branch. This is required if any of the two switch parameters are used
'origin'
-
SetDefault
No
Switch
Indicates that the new branch name should be set to the default for the remote
None
-
TrackUpstream
No
Switch
Indicates that the new branch name should be set to the track the branch in he remote
None
-
Special considerations or limitations
None.
The text was updated successfully, but these errors were encountered:
johlju
changed the title
Rename-LocalBranch: New command proposalRename-GitLocalBranch: New command proposal
Sep 3, 2024
Command proposal
Command to run:
Proposed parameters
Special considerations or limitations
None.
The text was updated successfully, but these errors were encountered: