簡體   English   中英

在分支之間合並時如何跳過git合並某個文件

[英]How to skip git merging a certain file, when merging between branches

在分支之間合並時如何跳過git合並某個文件

src/main/resources/application.properties in development branch contains ENV for dev
src/main/resources/application.properties in staging branch contains ENV for staging

git checkout staging git merge origin/development - 覆蓋上面的文件,我不想這樣做。 我應該如何防止這種情況

  1. git merge --no-commit
  2. 將文件編輯/還原為您想要的文件
  3. git add src/main/resources/application.properties
  4. git commit

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM