github - 給現有項目建立Git時遇到建立失敗的問題
淡淡烟草味
淡淡烟草味 2017-04-27 09:03:42
0
1
621

今天第一次嘗試建立Git,我參照這篇文章進行操作,成功將VS2013的本地庫與Github綁定並進行第一次同步後,我發現項目本身沒有被加入git,也沒有同步。


這是我希望同步的項目目錄

這是VS中顯示的解決方案

我直接給這個解決方案建立了Git

然後就得到了這個錯誤

之後打開Git管理器後是這個樣子

第一次同步後同步了一些不知道幹什麼的文件,反而最主要的網站目錄本身卻沒有同步。

那個錯誤怎樣解決呢?

淡淡烟草味
淡淡烟草味

reply all(1)
刘奇

I found the problem. When I first built a solution for the project, the generated .sln file was not in the same directory as the project file itself. The project file was placed under /github/workfolder, and the generated .sln The files are generated by default under /visual studio 2013/projects, so when using VS to create git, it will prompt that some files are not in the directory. During subsequent updates, only git is created for the /projects directory, and the updated files are only .sln files. . Later, I deleted the repository and solutions in the /projects directory, re-created solutions for the projects in /workfolder and put them together. After that, VS automatically recognized git in the same directory and was able to push and synchronize them. In short, the problem lies in the .sln file that is easily ignored.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!