如何将现有的 Android Studio 项目连接到现有的 Github 存储库 [英] How to connect existing Android Studio project to existing Github repository
问题描述
所以我是 Android 开发和 Android Studio 的新手.
So I am new to Android development and Android Studio.
我使用 Android Studio 创建了一个 Android 项目,每次我想将代码提交到 GitHub 时,我都会切换到命令行并从那里提交/推送代码.
I used Android Studio to create an Android project, and each time I wanted to commit the code to GitHub, I switched over to the command line and committed/pushed the code from there.
但是,我现在意识到 Android Studio 有自己的连接 GitHub 的功能.我想使用这些功能.
However, I realize now that Android Studio has it's own features for connecting to GitHub. I'd like to use those features.
由于项目已经存在,我不想只是从 Android Studio 创建一个新的 GitHub 存储库并删除旧的.我只想将现有的 GitHub 存储库与 Android Studio 项目连接起来.
Since the project already exists, I prefer not to just create a new GitHub repository from Android Studio and delete the old one. I just want to connect the existing GitHub repository with the Android Studio project.
如何同步这些?
推荐答案
如果你想创建一个新项目,我会查看这个线程.
I would view this thread if you want to create a new project.
如果这没有帮助,那么我将删除您当前的(本地)项目并从 github 导入.
If this doesn't help then I would just delete your current(local) project and import from github.
http://teamtreehouse.com/library/android-tools/git/pulling-down-github-projects-to-android-studio
我建议继续使用命令行.这是很好的做法.查看下面的链接了解更多信息.
I would recommend staying with command line. It is great practice. View link below for more information.
这篇关于如何将现有的 Android Studio 项目连接到现有的 Github 存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!