DEV Community

Vishal Yadav
Vishal Yadav

Posted on

How to delete the branch and create the new branch

For example:
This given command for go to main branch or I can also say that this command is use for changing the branch.

git checkout <branch name in which you go back>
Enter fullscreen mode Exit fullscreen mode

Delete a branch with

git branch -d <branch name>
Enter fullscreen mode Exit fullscreen mode

for creating the new branch in the main or master branch I can use the given command.

git branch -b <branch name>
Enter fullscreen mode Exit fullscreen mode

Done☺
.

IF you want to know more how to contribute on the opensource code on github

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More