Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git replace branch with another

# overwrite master with contents of feature branch (feature > master)
git checkout feature    # source name
git merge -s ours master  # target name
git checkout master       # target name
git merge feature       # source name
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #git #replace #branch
ADD COMMENT
Topic
Name
6+7 =