Answers for "git commit to branch"


git command to create a branch

//Create a New Branch
git checkout -b [name_of_your_new_branch]
//First Push
git push --set-upstream origin [name_of_your_new_branch]
Posted by: Guest on May-02-2020

git branch from commit

You can create the branch via a hash:

git branch branchname <sha1-of-commit>
Or by using a symbolic reference:

git branch branchname HEAD~3
To checkout the branch when creating it, use

git checkout -b branchname <sha1-of-commit or HEAD~3>
Posted by: Guest on July-30-2020

how to make branch in git command

git branch crazy-experiment
Posted by: Guest on September-07-2020

Browse Popular Code Answers by Language