Charismatic Applications be it software , mobile , technical, mechanical etc are result of a collaborative team work. Humans by basic nature are gregarious and like to live , work in a community. So how this nature won’t be applied to us Software engineers.
let me share my experience with you, when we were developing a software applications in a team. Since I was managing the whole software project , So at the end of the day I wanted that all code developed by my team should be at a single location. (obviously individual developers have to put their code)..
Android studio being a very powerful IDE for android apps development has built in support for integration with CVS, Maven, Git, subversion repository. For this blog post we will be taking Git repository as an example.
As you already know images are far more effective and leave a powerful impression on mind which remains in human memory for longer duration.
I . Lets begin with you don’t have a repository Url.
Step 1 .
1. Create Android Project
2. Create repository at Git server.
3. Import android project in repository.
4. now in another fresh window for Android studio, checkout the project from the url for the repository.
II. Lets begin with you already have a repository Url.
Just move to the step no 4 directly and if there is proper network connection and no problem occurs while communication with Git server , you will having a nice shining copy of project that is linked with Git repository.
So different developer will have different copy of same project in repo. whenever any developer does changes in the source code he or she needs to put that to repository. In terms of svn jargon we say it as developer will commit his or her source code so automatically changes will be committed to source repository.
Now any other developer in team has to update his code to get the fresh changes from the repository.
Working with repository or collaborative development has its own challenges that we will discuss in another blog post.
Using a simple command line option for Git Repository.
Suppose you have created a git repository : Link
- Now open command prompt or terminal in your computer.
- I hope you have git already installed.
- enter command git clone Link
- cd to created repository
- now you can place your Android project in this directory.
- Once this is done you can add your Android project to Repository using command git add .
- then you can commit your changes to local snapshot of your repository by git commit -m “comment text”
- then if required you can push your changes to actual git repository by git push -u origin master.
In some other post I will tell what is the concept of origin.
Thanks for reading Happy Coding!