本文介绍了为Ubuntu中的现有文件创建一个新的BitBucket存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些文件要添加到BitBucket上的新存储库中.如何使用Ubuntu的命令行执行此操作?

I have files that I want to add to a new repository on BitBucket. How can I do this using a command line from Ubuntu ?

一种替代方法是先从BitBucket网站创建存储库,但我不知道如何将存储库克隆到非空目录中.

An alternative would be to create the repository first from the BitBucket website but I don't know how to clone a repository into a non-empty directory.

推荐答案

有关:

在BitBucket上创建存储库时,会为您提供两个链接:

When you create a repo at BitBucket, you are offered two links:

  • 我从头开始"
  • 我有一个要推广的现有项目"

单击第二个,将为您提供在本地存储库中运行的命令.这些看起来像:

Click on the 2nd, and you will be given the commands to run in your local repo. These would look like:

> cd /path/to/my/repo
> git remote add origin https://[email protected]/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

这篇关于为Ubuntu中的现有文件创建一个新的BitBucket存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 01:52