![](/img/trans.png)
[英]Visual studio 2019 "Error encountered while pushing to the remote repository: Failed to push to the remote repository..."
[英]Visual Studio 2019 is pushing only git files to remote repository
當我在 Visual Studio 2019 中創建 .NET 核心項目並將其添加到源代碼控制時,本地存儲庫的創建沒有任何錯誤。 但是當我嘗試使用 Team Explorer 將本地 repo 發布到私有 BiBucket 存儲庫時,只有 .gitattributes 和 .gitignore 文件被推送到遠程 master。 我看不到我的任何項目文件。
有什么建議么?
您需要在項目中的文件上git add
。 我不確定這是如何在 Visual Studio 中完成的。
首先,您需要使用git status
檢查 git 的狀態。 之后,您可以使用git add.
添加要提交的文件。
我的案例示例:
git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: package-lock.json
modified: package.json
modified: public/index.html
modified: src/App.js
右鍵單擊 Visual Studio 中的文件,然后從 git 選項中選擇將忽略的文件添加到源代碼控制,當您剛剛推送更改時
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.