Rename Remote Branch
To complete this challenge, you will use the Git repository git-playground
from your GitHub account, which comes from a fork of https://github.com/labex-labs/git-playground.git
. Please uncheck "Copy master branch only" when forking.
You have a Git repository named https://github.com/your-username/git-playground
. You have created a branch named feature-branch
and pushed it to the remote. Now you want to rename the branch to new-feature-1
both locally and on the remote.
Tasks
- Clone the repository, navigate to the directory and configure the identity.
- Switch to the named
feature-branch
branch.
- Rename the branch both locally and on the remote.
- Verify that the branch has been renamed.
This is the result of running git branch -a
:
* master
new-feature-1
remotes/origin/HEAD - > origin/master
remotes/origin/master
remotes/origin/new-feature-1