TFS-Git with Android Studio Part-1

In this post i am gonna show you how to work with TFS Git using Android Studio!
Before starting with this guide, make sure you have the below Pre-requisites.

  1. Android Studio (2+)
  2. IntelliJ Plugin ( https://plugins.jetbrains.com/plugin/7981 )
  3. Active VSTS/TFS account

 

This post helps you to simplify and optimise developer interaction with TFS and VSTS Git repositories from IntelliJ or Android Studio. These provide on-premises and cloud collaboration services for version control, agile planning, software build & continuous delivery, application analytics etc.

 

Importing the Project into TFS/VSTS Git repo

  1. Open the Android Studio and select “open an existing Android Studio Project”

1

2. Navigate to the path of your project

2

3. Once the project is loaded, it will ask for adding the root to VCS (Version control System)     since it is under git repository. You can add root now or later-

3

4. Select the project and import it to the TFS git repository-

4

5

5. Select the Project and the account to which you would like to import and click ok-

6

6. Once imported, you should be able to see the project on TFS- Git

7

Cloning a project from TFS-Git

  1. Checkout the project from version control –

1

2. Select the project you wish to clone-

2

3. You will be able to see the project that was checked out-

3

 

Basic commits to the repository-

  1. Edit the file you wish-

4

You will see that the files were detected locally upon modification-

2. Browse to the VCS and commit changes-

5

3. The edited files will be listed out during the commit-

6

4. Commit the changes. Do not directly commit and push the changes as that might break        your main code if any conflicts-

7

5. You should see the successful commit message

8

6. Push the changes to the remote git repo-

9

7. You will see the commits listed under and the branch that you are pushing too. In this          case, we have only “origin:master”

10

8. You will see the push successful message-

11

9. Browse to the file in web and look for the changes done-

12

 

In the next post, i will show you how to handle merge conflicts, handling pull requests etc.

Thanks,
Srivatsa

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: