Thursday, April 30, 2015

Using GIT with Android Studio on windows with terminal or toolbar

Today We are going to learn how we can create a git repository using android studio.
Android Studio Makes it very simple just follow the below steps and your project is on git :
First we setup our PC ::

Download git from :http://git-scm.com/download/win

install it.

for git repository online I am using Bitbucket  , bitbucket allow us to host private repository free you can also use github but your project should be public if you want to use it free.

Here I am going to use bitbucket:
Create repository
After creating repository  you will see screen like this


Now open AndroidStudio Create new project.
after creating the project clcik on VCS on menu strip  and enable git as shown below

Now your project git enabled ;
You can see terminal in andoid studio we can use it for git commands.
Now check terminal and write git status if it  give you below message :
'git' is not recognized as an internal or external command, operable program or batch file.
then you have to follow below steps (from Stackoverflow):

  • right-click "My Computer",
  • select "Properties",
  • open "Advanced",
  • click "Environment Variables",
  • highlight the "Path" variable,
  • click "Edit",
  • add your specific path to front of "Variable value" field, separated by a semicolon from the existing entry. Do not add a space between ; and last entry
Now your terminal should work with git command.

You have to put you remote address of your project   :

got to bitbucket page and get the link 






now you can use command or commit button in android studio to commit your project
 Now you can push your  changes to server. by git push -u origin master

you can refresh your bitbucket page and see your commits are there :)
Happy coding :)

4 comments:

  1. Wonderful post!!Thank you for sharing this info with us.
    Keep updating I would like to know more updates on this topic
    Very useful content, I would like to suggest this blog to my friends.

    Web Designing Course in Chennai

    web designing training in Chennai

    ReplyDelete
  2. I am happy to find this post Very useful for me, as it contains lot of information

    Education
    Technology

    ReplyDelete
  3. Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
    Network security training in coimbatore
    IT security training in coimbatore

    ReplyDelete
  4. What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. app cloner

    ReplyDelete

Postman beginner Tutorial

Hi , I have started new video series of postman tutorial hope it will be helpful:Please give me your feed back in comments and like and sub...