Git 将文件添加到 repo [英] Git adding files to repo
问题描述
我遵循了基本的 Git 教程并添加了 README 文件,这很有效.然后我将我的项目文件复制到同一个文件夹并尝试通过运行将它们添加到存储库
I followed basic Git tutorial and added README file, which worked. Then I copied my project files to the same folder and tried to add them to repository by running
git add --all
git ci 'test' (my alias for commit)
git push origin master
并没有被推动.
我应该运行哪些命令来将我的文件推送到远程存储库(主)?
What are the commands I should run to push my files to the remote repository (master)?
我尝试提交更改并运行状态,但它显示无需提交".它无法识别,我将许多新文件复制到该文件夹中..
I tried to commit changes and run status but it says 'nothing to commit'. It does not recognize, that I copied lots of new files to that folder..
好的,我输入: git add .(控制台没有响应)然后输入提交,并说没有变化..
OK, so I type: git add . (get no response from console) then type to commit, and says no changes..
推荐答案
我遇到了连接存储库的问题.我是如何修复的:
I had an issue with connected repository. What's how I fixed:
我手动删除了项目文件夹下的 .git 文件夹,运行 git init 然后一切正常.
I deleted manually .git folder under my project folder, run git init and then it all worked.
这篇关于Git 将文件添加到 repo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!