Answers for "how to make copy of branch in git"

1

creating copy of a branch

git checkout -b new_branch old_branch
Posted by: Guest on August-03-2020
0

how to make copy of branch in git

# initial state 
commit 2 (65bc341)   O  <-- master
                     |
     (more commits) ...
                     |
commit 1 (125afe4)   O  <-- origin/master

# run command
git push origin 125afe4:refs/heads/master-copy

# result
commit 2 (65bc341)   O  <-- master
                     |
     (more commits) ...
                     |
commit 1 (125afe4)   O  <-- origin/master origin/master-copy
Posted by: Guest on September-16-2020

Code answers related to "how to make copy of branch in git"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language