简体   繁体   English

如何将本地存储库推送到远程使用“SourceTree”

[英]How to push a local repository to remote use “SourceTree”

As the title says, I use GIT by SourceTree. 正如标题所说,我使用SourceTree的GIT。

My question is how can I create a remote repository by SourceTree directly ? 我的问题是如何直接通过SourceTree创建远程存储库?

For example, I have a directory named "Test" at local. 例如,我在本地有一个名为“Test”的目录。 There is some text file in "Test" and the remote server doesn't have any repository. “Test”中有一些文本文件,远程服务器没有任何存储库。

Now, I need push "Test" to server. 现在,我需要将“测试”推送到服务器。 Is there any way to create a remote repository by SourceTree ? 是否有任何方法可以通过SourceTree创建远程存储库?

Not using command line or other way, Just use SourceTree(Which button or how setting... etc. ?) (I found a command line is "scp -r LocalFileName RemoteFilePath".) Hope them has same effect. 不使用命令行或其他方式,只需使用SourceTree(哪个按钮或如何设置......等?)(我发现命令行是“scp -r LocalFileName RemoteFilePath”。)希望它们具有相同的效果。

ps I'm using SSH ps我正在使用SSH

I tried this on SourceTree 1.6+ 我在SourceTree 1.6+上试过这个

Click View -> Hosted Repositories Here you will see all your remote repositories. 单击View -> Hosted Repositories在这里,您将看到所有远程存储库。

Click the buttom at the bottom Create New Repository... This will allow you to create a new repo on Bitbucket. 单击底部的buttom Create New Repository...这将允许您在Bitbucket上创建一个新的Create New Repository... Enter name and create your repo. 输入名称并创建您的仓库。

Once you see your new repository in the list, right click on it and click Copy Project URL to Clipboard 在列表中看到新存储库后,右键单击它并单击“ Copy Project URL to Clipboard

Now use this URL in the URL/Path field for the Remote details when you add a remote to your local repository. 现在,在将远程添加到本地存储库时,在URL/Path字段中使用此URL来显示远程详细信息。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM