2016-09-23 234 views
1

我使用Visual Studio 2015年,我有一個Visual Studio Team Services(是Visual Studio在線)git回購VS項目。同步git回購時,我有同時傳入和傳出提交

我每次都要進入提交和傳出的承諾(同時),如果我一拉請求時,我得到的錯誤信息:

Cannot pull because there are uncommitted changes. Commit or undo your changes before pulling again. See the Output window for details.

如果我嘗試做一個承諾,我得到以下錯誤:

You cannot push branch develop to remote origin because there are new commits in the remote repository’s branch. Pushing this branch would result in a non-fast-forward update on the branch in the remote repository.

所以我打在牆上,卡住每次我有類似的情況:

State of Team Explorer when i have issues

Unable to pull

Unable to push

我試着在命令行,但到目前爲止,它讓我失去工作(主要是由於我缺乏經驗的git)。

有沒有辦法通過Visual Studio來解決這個問題? 如果不是,這種情況下最好的方法是什麼?

回答

0

您必須將更改提交到您的本地存儲庫,然後從遠程獲取更改。在合併/解決衝突之後,您將能夠推送您的更改。

+0

這太簡單了!非常感謝! –