Without Using Any Plug-in
- First from VCS menu of android studio select Enable Version Control Integration, it will ask you for selecting versioning tool, select git from the drop down.
- Create new repository in the BitBucket account for the project, selecting git as the repository type.
- Now from the terminal window at the bottom of android studio, type:
git add -A
This will add the files to git for committing. - To commit with a message type
git commit -m "First Commit"
in the terminal. Here, First Commit is just a message i used for demonstration. - From Bitbucket, in the newly created repo, select I have an Existing Project from below. It will give you two command line commands. Use Them consecutively. These will add the local repo to the bitbucket. First one:
git remote add origin https://example@bitbucket.org/example/test.git
Second one:
git push -u origin master
- Add again
git add -A
- Then Commit
git commit -m "Second Commit"
-
Push for the last time
git push origin master
-
You can check that the branch is up-to-date by writting
git status
On branch master
Your branch is up-to-date with ‘origin/master’.
nothing to commit, working tree clean - Done .
My Android Studio version was2.3.3
& git version2.13.0.windows.1