![](/img/trans.png)
[英]How to checkout files from another branch and then overwrite the current branch
[英]How to get files from another branch into my current branch?
這是一種情況:
我在branch1
並推送了更改。 然后,我在branch2
執行了第二項任務,並將其也推送了。 之后,我再次切換到branch1
並向其中添加一些代碼,然后再次推送。 現在,我在branch2
一次沒有這是在去年做的變化branch1
。
我該怎么做?
我經常使用它從master進入工作分支。 git pull origin branch1
嘗試合並分支。
git pull --all
git checkout branch2
git merge branch1
您可能需要解決一些合並沖突
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.