【问题标题】:Git repository pushing another project (Bitbucket)Git 存储库推送另一个项目(Bitbucket)
【发布时间】:2015-02-12 19:17:45
【问题描述】:
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 是 homebrew 的来源(这不是我的项目,在发生此错误之前我什至不知道它是什么)。

我已经尝试通过(远程)删除并重新创建来重新创建存储库。我已经尝试过重新创建“master”和“origin”。我尝试设置源的 url,我尝试上传一个完全不同的项目,我尝试将项目文件夹移动到一个新目录,但我得到的仍然是“自制软件”。

其他信息:在 Mac Book Pro 上运行 Mac OSX 10.10.2。之前可以成功上传这个项目,但是现在不行了。

【问题讨论】:

  • cd 进入你的仓库后,git config -l 的输出是什么?

标签: macos git terminal repository


【解决方案1】:

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

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

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

【讨论】:

    猜你喜欢
    • 2013-03-02
    • 2017-11-22
    • 2019-06-30
    • 2013-04-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-06
    相关资源
    最近更新 更多