Say I have two branches - master
and redesign
. How would I go about overwriting the file default.aspx.cs
in my redesign branch with the one from master?
I found this question but it seems to go over how to revert a file back to it's previous version in the same branch. I also considered using a merge
, but I don't want to merge, I want to overwrite. Suggestions?
git checkout master path/to/default.aspx.cs
Before doing this, you probably have to : git checkout redesign
So, just git checkout FROM_BRANCH_NAME path/to/file
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.