Create a new branch from the current branch

 Git create new branch from master or current branch (mytrashcode.com)


To create a GIT branch from the current branch, you can use three commands sequentially and expect git to create a new branch for you.

git checkout master
git pull
git checkout <already_exisiting_branch>
git checkout -b <New_branch_name>

How this works :

  • It will first take you to master and pull the latest changes for all the branches of the repo.
  • Then move to an existing branch
  • Then creates a new branch from the existing branch with all the changes of the original branch.

There are few other ways you can create a branch. One is from a single commit and the other one is from any release tag.

Không có nhận xét nào:

Is it okay to use both fetchpriority="high" and loading="eager" in img tag?

 https://stackoverflow.com/questions/77744344/is-it-okay-to-use-both-fetchpriority-high-and-loading-eager-in-img-tag Yes Fetchpriority and l...