Pulling down latest code from github to Android Studio

家住魔仙堡 提交于 2019-11-30 01:42:10

问题


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?


回答1:


"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, 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.




回答2:


First, you can import your project on the main menu using the check out project form Version Control. Then you can use the VCS->Update Project to download all the changes. This will leave your local changes and show you conflicts.



来源:https://stackoverflow.com/questions/30766679/pulling-down-latest-code-from-github-to-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!