我有一些文件要添加到 BitBucket 上的新存储库中。我如何使用 Ubuntu 的命令行执行此操作?
另一种方法是先从 BitBucket 网站创建存储库,但我不知道如何将存储库克隆到非空目录中。
最佳答案
有关 Bruce's comment 的更多详细信息:
当您在 BitBucket 创建一个 repo 时,您会得到两个链接:
- “我从头开始”
- “我有一个现有的项目要推送”
单击 2,您将获得在本地存储库中运行的命令。这些看起来像:
> cd /path/to/my/repo
> git remote add origin https://me@bitbucket.org/me/test.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
关于git - 为来自 Ubuntu 的现有文件创建一个新的 BitBucket 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20045228/