简体   繁体   English

将项目推送到新创建的存储库

[英]pushing project to a newly created repository

I've migrated from Eclipse to Android Studio.我已经从 Eclipse 迁移到 Android Studio。 Now I have created a new repository in Visual Studio for the Android Studio (2.0 version) project.现在我在 Visual Studio 中为 Android Studio(2.0 版)项目创建了一个新存储库。 In Android Studio I have done the following :在 Android Studio 中,我完成了以下操作:

  1. Enabled "Version Control Integration"启用“版本控制集成”
  2. Chose Git as the selected version control system (all the files' names turned red)选择 Git 作为选定的版本控制系统(所有文件的名称都变成红色)
  3. Added all the folders in the project to staging(They are all green now)将项目中的所有文件夹添加到暂存(现在它们都是绿色的)
  4. Now I'm a bit confused how do I link all of it to the repo I created?现在我有点困惑如何将所有这些链接到我创建的存储库? where do I place the visual studio url of the new repo ?我在哪里放置新仓库的visual studio url? will it automatically push it all to a branch that will be called 'master' ?它会自动将其全部推送到一个名为“master”的分支吗?

Try like this:像这样尝试:

cd /path/to/project/
git init
git remote add origin yourgiturl
git push origin master

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

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