将 git 与 BitBucket 一起使用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7193054/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 11:41:08  来源:igfitidea点击:

Using git with BitBucket

gitbitbucket

提问by Rook

I know there's a certain plugin, but I've never played with git plugins nor am that good with git. I just use rather simple workflow.

我知道有一个特定的插件,但我从来没有玩过 git 插件,也不擅长 git。我只是使用相当简单的工作流程。

So, my question goes. How can I, (in simple terms if it's not a problem), upload a git project to BitBucket ?

所以,我的问题是。我如何(简单来说,如果没有问题)将 git 项目上传到 BitBucket ?

If you know of any web tutorials that cover this, that would be equally good.

如果您知道任何涵盖此内容的网络教程,那将同样好。

回答by Peter

As of today, it appears that BitBucket supports GIT natively. I don't think their documentation is up to date yet however.

截至今天,BitBucket 似乎原生支持 GIT。但是,我认为他们的文档还不是最新的。

http://www.infoq.com/news/2011/10/bitbucket-git

http://www.infoq.com/news/2011/10/bitbucket-git

回答by JasonG

I use bitbucket daily.

我每天都使用bitbucket。

  1. Log on to bitbucket.
  2. Set up a repository.
  3. Click clone in the webapp in your repository and copy the command to your clipboard.
  4. Paste the command into your terminal (assuming you have git installed).
  5. Copy all files for your project into the directory you cloned.
  6. type 'git push' and enter your bitbucket password.
  1. 登录到 bitbucket。
  2. 设置存储库。
  3. 单击存储库中 webapp 中的 clone 并将命令复制到剪贴板。
  4. 将命令粘贴到您的终端中(假设您已安装 git)。
  5. 将项目的所有文件复制到您克隆的目录中。
  6. 输入 'git push' 并输入您的 bitbucket 密码。

Done!

完毕!

回答by lakesh

If you importing a repository, follow this

如果您导入存储库,请按照此操作

 cd /path/to/my/repo
 git remote add origin https://[email protected]/username/example.git
 git push -u origin master   # to push changes for the first time