用文件夹的内容替换github存储库的内容

时间:2021-02-11 00:26:45

I'm trying to replace the contents of a github repository with the contents of a folder. I've tried git push, but it doesn't seem to do anything unless I add each of the files individually using the command line. Is there any command that I can use to replace the contents of the repository with the folder's contents?

我正在尝试用文件夹的内容替换github存储库的内容。我已经尝试过git push,但它似乎没有做任何事情,除非我使用命令行单独添加每个文件。是否有任何命令可用于使用文件夹的内容替换存储库的内容?

My repository is here: https://github.com/jarble/downloadedModules

我的存储库在这里:https://github.com/jarble/downloadedModules

1 个解决方案

#1


1  

git add adds your modified files to the queue to be committed later

The following are the steps to add a file and push to the repository:

git add将修改后的文件添加到稍后要提交的队列中以下是添加文件并推送到存储库的步骤:

git add <file/folder>
git commit -m "Checkin in code"
git push -u origin master

For detailed explanation refer to this answer

有关详细说明,请参阅此答案

#1


1  

git add adds your modified files to the queue to be committed later

The following are the steps to add a file and push to the repository:

git add将修改后的文件添加到稍后要提交的队列中以下是添加文件并推送到存储库的步骤:

git add <file/folder>
git commit -m "Checkin in code"
git push -u origin master

For detailed explanation refer to this answer

有关详细说明,请参阅此答案