Configure Android Studio with Bitbucket team repo

前端 未结 7 1668
长情又很酷
长情又很酷 2021-01-31 02:59

I am trying to configure Android Studio to work with my team repo on Bitbucket. What I would like to do in the first place is to push my local project onto my team\'s repo.

7条回答
  •  -上瘾入骨i
    2021-01-31 03:30

    Without Using Any Plug-in


    1. 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.
    2. Create new repository in the BitBucket account for the project, selecting git as the repository type.
    3. Now from the terminal window at the bottom of android studio, type: git add -A This will add the files to git for committing.
    4. 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.
    5. 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
    6. Add again git add -A
    7. Then Commit git commit -m "Second Commit"
    8. Push for the last time git push origin master

    9. 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

    10. Done . My Android Studio version was 2.3.3 & git version 2.13.0.windows.1

提交回复
热议问题