Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #copy #branch #git
ADD COMMENT
Topic
Name
9+5 =