How to copy SOME files from one branch to the other?

Asked

Viewed 1,628 times

2

I have 2 branch, "B1" and "B2". I need to copy files from "B2" which is more evolved and move to "B1", but some files I don’t want. How do I?

1 answer

3


Being in branch B1:

git checkout b1

You can use the following command to get the newest version of the B2 branch file:

git checkout b2 arquivo_mais_evoluido_1.txt

If there are multiple files, you can use the same command above to grab all the files within a directory. Example:

git checkout b2 diretorio/arquivos/mais/novos/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.