How to make pull request from android studio?

为君一笑 提交于 2020-06-29 04:18:16

问题


I forked application to android studio and when I try to make a pull request:

I get :

Can't Create Pull Request
            Push failed:
            failed to push some refs to 'https://github.com/projectname.git'

What is the right way to do that?

Note :

I can commit and update my projects but I can't make pull request to other projects.


回答1:


This is obviously an authentication problem. There are WAY too many unknowns, so I doubt anyone can give you a definitive answer. Here are the steps to investigate in order to solve it:

  • Is your GitHub Account authenticated with your Android Studio installation? Check your Android Studio Settings.

  • In order to authenticate you need to generate an Access Token through your Github account settings and use that token as seen in the picture above. When generating a new token, normally I would advise you to be careful with the permissions you grant to it. For debugging your issue, generate a new one with full access to everything and delete it as soon as you resolve your issue.

  • Last, if both of the above steps are done correctly and you still can't open a PR. Make sure the repository you trying to open a PR on, allows third party users to perform such actions.

NOTE: You can always commit code in your local repository. That lives in your local environment (a.k.a. your computer) and you have full permission to do whatever you please with it. That doesn't mean the changes you do locally, will be reflected in the remote repository (a.k.a. the one hosted at Github servers).




回答2:


First you need to install git client and configure with Android studio then you need to enable git into android studio from VCS option. and then you can see on toolbar 2 icon will come for push and pull request. by these two option you can do pull and push very easly.

please have look this. http://prntscr.com/hgvbxw

reference-https://javapapers.com/android/android-studio-git-tutorial/



来源:https://stackoverflow.com/questions/47557138/how-to-make-pull-request-from-android-studio

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