如何将远程仓库与当前现有目录合并?

时间:2018-01-30 20:51:48

标签: python django git unix bitbucket

我的Bitbucket仓库里有我的Django项目,我希望与我新创建的Digital Ocean服务器合并。服务器目录包含我的服务器的Django项目的一些基本文件,如envstaticmanage.py。 Bitbucket repo拥有我的所有项目应用程序等。我已经从服务器目录中完成了git remote add origin https://user@bitbucket.org/user/project.git。然后我执行git merge master,但它说Already up-to-date.。我试过了git pull master,但它说:

fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

知道我能尝试什么吗?

1 个答案:

答案 0 :(得分:0)

使用git pull命令,如

MANIFEST.in

这意味着,如果您没有使用任何git pull [options] [<repository> [<refspec>...]] ,则使用

[options]

在你的情况下最终会

git pull <repository>

如果您想指定branch,那么您可以这样做(对于git pull origin

master

您使用的命令(git pull origin master )将无效,因为您告诉git从存储库 master 中提取,而remotes中不存在该存储库。您已经可以告诉我错误消息git pull master

如果你想获得更改并自己合并,你可以使用git fetch命令,无论如何都要使用我的拉。