Overwrite a single file in my current branch with the same file in the main branch?

Let's say I have two branches - master and redesign . How can I rewrite the default.aspx.cs file in my redesign branch with the name from the wizard?

I found this question , but it seems to move on to how to revert the file back to the previous version in the same branch. I also considered using merge , but I don't want to merge, I want to overwrite. Suggestions?

+42
git
Dec 12 '12 at 19:47
source share
1 answer

git checkout master path/to/default.aspx.cs

Before you do this, you probably have to: git checkout redesign

So just git checkout FROM_BRANCH_NAME path/to/file

+59
Dec 12 '12 at 19:51
source share
— -



All Articles