git 如何将本地存储库推送到远程使用“SourceTree”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25985597/
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
How to push a local repository to remote use "SourceTree"
提问by Quen
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. 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”。)希望它们具有相同的效果。
p.s. I'm using SSH
ps 我正在使用 SSH
回答by Neo
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. Enter name and create your repo.
单击底部的按钮Create New Repository...
这将允许您在 Bitbucket 上创建一个新的存储库。输入名称并创建您的存储库。
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 。