First of all, I know that Github is more popular for central version control management but I am learning to develop apps and I don't want to learn in public, as Github doesn't have any free private repositories. Bitbucket does. Also, Bitbucket seems to be a very reliable service.
First, set up a new repository on Bitbucket. The most important setting here is to use Git. Mercurial works as well, but I am not covering that here.
Second, once the new repo is set up on Bitbucket, there will be a link that says "I have an existing project to push up." Click that link. There will be some instructions with a set of terminal commands on the page.
Next, go to Android Studio and add your project to a Git VCS. In the VCS menu go to Git and select "Add to VCS." This will create a local Git repository that we will then upload (push) to Bitbucket.
Next, access the terminal in Android Studio by clicking on the Terminal button at the very bottom of the window. This opens the terminal at the location of your project. If you read the instructions on the Bitbucket site you would see that the first command was to get you into this directory. I found this way easier.
Now copy the last three command lines from the Bitbucket website to the terminal window in Android Studio. Do each one individually. These lines add the URL of the Bitbucket repository as a remote to you local repository. Then this pushes what is already there to the website.
That is all. From now on when you go to the VCS menu and press Push it will upload to the Bitbucket repository. I did this on a Mac so the terminal commands may be a little different on Windows.
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點擊舉報。