[英]How can I get Visual Studio to show merge conflicts under git?
我正在使用Visual Studio 2015 Pro並使用Git repo。 假設我做了拉動或應用隱藏的更改或做了一些導致我的分支發生沖突的事情。 例如,在這種情況下,我只是應用了一個存儲:
正如您所看到的,我有一些更改,但Web.config存在沖突。 為什么始終存在沖突的XML文件?
現在,我進入Visual Studio並轉到Team Explorer-> Changes :
在這里,我看到我的暫存的變更,但也有不分級的零個變化。 我想知道為什么Web.config沒有顯示在這里,所以我可以解決沖突。
兩件事情:
git config --global merge.tool
已經vsdiffmerge
所以如果我要運行git mergetool
命令行,那就再使用Visual Studio合並。 但是,這樣做會產生一個全新的Visual Studio實例,這個實例很慢而且很煩人,並且不允許我在我的項目的其余部分中工作。 有人對這個有任何見解嗎? 謝謝!
在Visual Studio Professional 2017 15.7.4中,“ 更改”窗口似乎顯示沖突。
設置:
/mnt/c/git/ConsoleApp1>git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: ConsoleApp1/Class1.cs
modified: ConsoleApp1/Program.cs
/mnt/c/git/ConsoleApp1>git stash apply
Auto-merging ConsoleApp1/Program.cs
CONFLICT (content): Merge conflict in ConsoleApp1/Program.cs
/mnt/c/git/ConsoleApp1>git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: ConsoleApp1/Class1.cs
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)
both modified: ConsoleApp1/Program.cs
/mnt/c/git/ConsoleApp1>
有顏色:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.