将最新代码从 github 拉到 Android Studio [英] Pulling down latest code from github to Android Studio
问题描述
如何使用 github
上的最新代码同步
我的本地 Android Studio 项目?
我想下载所有最新的更改但我不希望我的本地更改被覆盖.
如果有冲突,它应该让我解决那些特定的文件.
有没有办法实现这一目标?
How to sync
my local Android Studio project with the latest code on github
?
I want to download all the latest changes but I don't want my local changes overwritten.
If there is a conflict, it should ask me to resolve those particular files.
Is there a way to achieve this?
推荐答案
我想下载所有最新的更改,但我不想要我的本地更改被覆盖"
"I want to download all the latest changes but I don't want my local changes overwritten"
您可能希望在合并更改之前获取"上游.
You probably want to 'fetch' the upstream before merging your changes then.
VCS -> Git -> Fetch,这会更新你所有的分支,所以你可以检查它们,然后使用 VCS -> Git -> Merge Changes 来更新你的本地代码.
VCS -> Git -> Fetch, this will update all your branches, so you can check them and later use VCS -> Git -> Merge Changes to update your local code.
我认为这最适合您的需求.通常,我只会拉取更改并解决冲突.
That's what fits your needs the best, I think. Normally, I would just pull the changes and resolve the conflicts.
这篇关于将最新代码从 github 拉到 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!