Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git add file from another branch

git checkout <branch1>
git checkout <branch2> -- <file_name>
# where <branch1> is the one you want to add the file to 
# and <branch-2> is the one where the file is located
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #add #file #branch
ADD COMMENT
Topic
Name
8+7 =