wordsforthewise wordsforthewise - 1 month ago 7
Git Question

Git -- merge master with branch and create new file from master that was renamed

I'm trying merge in the master branch to my own branch, using

git merge master

after doing
git checkout mybranch
.

I renamed a file in my branch from
something.py
to
something-old.py
.

Everything seems all good after I merge, but the
something.py
file does not show up in
mybranch
. Is there an easy way to get the file (or if it was 100s of files I renamed, etc) back to match the master?

Answer

git checkout master something.py will pull file something.py from master into your current working copy

Comments