简体   繁体   English

Git Clone然后git pull

[英]Git Clone then git pull

Hi there I just did a git clone of a repo on my PROD server, then changed folder name sudo mv folder correct_folder_name 嗨,我刚刚在PROD服务器上做了一个仓库的git clone ,然后更改了文件夹名称sudo mv文件夹correct_folder_name

I have made changes on local machine then git push to repo. 我在本地计算机上进行了更改,然后使用git push进行了回购。

I go back to my PROD server and git pull, but there is not .git repo fatal: Not a git repository (or any of the parent directories): .git 我回到PROD服务器并进行git pull,但是没有.git repo fatal: Not a git repository (or any of the parent directories): .git

What are the steps to pull next commit? 拉下一次提交的步骤是什么? git init git merge git init git merge

not sure ? 不确定 ?

I know this topic is terribly old, bu maybe someone will You shouldn't rename a repo outside the git. 我知道这个话题太老了,也许有人会你不应该在git之外重命名一个仓库。 You should use: 您应该使用:

git mv olddir newdir

It consists of the following commands: 它由以下命令组成:

mv olddir newdir
git add newdir
git remove olddir

So I guess that running the two remaining git commands would help to first correct the problem with the repo. 因此,我想运行剩下的两个git命令将有助于首先解决存储库中的问题。 Then you should be able to do the pull. 然后,您应该可以进行拉动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM