Git存储库推送另一个项目(Bitbucket)

时间:2014-12-14 16:36:22

标签: macos git terminal repository

cd /path/to/my/repo
git remote add origin https://user@bitbucket.org/team/project-name.git
git push -u origin --all # pushes up the repo and its refs for the first time
git push -u origin --tags # pushes up any tags

Bitbucket让我运行这些代码行(显然填写了我的信息)当我做终端窗口显然是将项目上传到Bitbucket,但是每当它完成并且我将repo克隆到我的本地机器时, project是自制软件的来源(这不是我的项目,在发生错误之前我甚至不知道它是什么)。

我已经尝试通过删除它(远程)并再次创建它来重新创建它。我已经尝试重新创建“主人”和“原点”。我已经尝试设置原点的URL,我尝试上传一个完全不同的项目,我已经尝试将项目文件夹移动到一个新目录,而且我所得到的只是“自制”。

其他信息:在Mac Book Pro上运行Mac OSX 10.10.2。我以前能够成功上传这个项目,但现在它无法正常工作。

1 个答案:

答案 0 :(得分:0)

我会尝试删除本地存储库中repo中的.git文件。

所以cd到您的本地仓库,然后运行rm -rf .git。这就像是“你试过再打开它”的git版本。

祝你好运,我希望这会有所帮助