Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename-GitLocalBranch: New command proposal #10

Open
johlju opened this issue Sep 3, 2024 · 0 comments
Open

Rename-GitLocalBranch: New command proposal #10

johlju opened this issue Sep 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@johlju
Copy link
Member

johlju commented Sep 3, 2024

Command proposal

Command to run:

# 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.

@johlju johlju changed the title Rename-LocalBranch: New command proposal Rename-GitLocalBranch: New command proposal Sep 3, 2024
@johlju johlju added the enhancement New feature or request label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant