![](/img/trans.png)
[英]Git Overwrite file in master with same file from different branch
[英]Overwrite single file in my current branch with the same file in the master branch?
假設我有兩個分支- master
分支和redesign
分支。 我該如何用master的那一個覆蓋我的redesign分支中的文件default.aspx.cs
?
我發現了這個問題,但是似乎遍歷了如何將文件還原到同一分支中的先前版本。 我也考慮過使用merge
,但是我不想合並,我想覆蓋。 有什么建議嗎?
git checkout master path/to/default.aspx.cs
在此之前,您可能必須: git checkout redesign
因此,只需git checkout FROM_BRANCH_NAME path/to/file
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.