Git添加文件到回购 [英] Git adding files to repo

查看:107
本文介绍了Git添加文件到回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循基本的Git教程并添加了工作的README文件。然后我将我的项目文件复制到同一个文件夹,并试图通过运行

  git add --all $ b将它们添加到存储库$ b git ci'test'(我的提交别名)
git push origin master

并没有推动。



我应该运行哪些命令将文件推送到远程存储库(master)?

I试图提交更改并运行状态,但它说'没有提交'。它不承认,我将大量新文件复制到该文件夹​​。



好的,所以我输入:git add。 (从控制台得到没有响应)
然后输入提交,并说没有更改..

解决方案

我有一个问题与连接的存储库。我是如何修复的:

我手动删除了我的项目文件夹下的.git文件夹,运行git init,然后全部运行。


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

and nothing got pushed.

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..

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:

I deleted manually .git folder under my project folder, run git init and then it all worked.

这篇关于Git添加文件到回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆