Git for Android Developers(Part 1) — Introduction

Rajkumar Srinivasan
IVYMobility TechBytes
3 min readNov 25, 2018

GIT is the most popular and free distributed VCS tool.

What is VCS(Version Control System) ?

The VCS record the changes made to the file or set of files over time so that we can track the change history at any time.

Types of VCS

The VCS types are classified based on the mode of operation.

  1. Local VCS
  2. Centralized VCS
  3. Distribued VCS

Local VCS

  • The first step of version control system.
  • A local database was used to track changes by storing the patch sets.
  • Drawbacks- This type of VCS is useful to only a single developer at a time. More than a developer could not collaborate their changes from different system.

Centralized VCS

  • To overcome the limitations of using local VCS by the several developers, the patch sets are stored in a single location at the central server called central VCS.
  • In this way, Administrators gained more control to the code through the central server to define access levels for the developers.
  • Now user can simply checkout the project from any computer and do the changes and commit it to the server.
  • Ex: CVS, Subversion,Perforce..
  • Drawbacks: If the central server goes down for an hour, then during that hour nobody can save their changes to the version database. If central DB is corrupted, and no proper backup have taken, then you will lose everything. It has the same drawback as local VCS except the centralization of DB.

Distributed VCS:

  • To overcome the drawbacks of central VCS, the full repository is downloaded while checkout. So every checkout is the full backup of all the data.
  • If any server dies then repository can be pushed back to the server from any local computers or client repositories.
  • So we can collaborate with different group of peoples in different ways simultaneously within the same project.
  • This fully-functional local repository make it easy to work offline or remotely.
  • Ex: GIT, Bitbucket..

GIT Terminology:

Before going in detail about GIT, It will be good to have some idea about the basic terminologies. So i’m listing few basic terminologies..

  • Master- The repository’s main branch.
  • Clone- The action of copying a repository to the working directory.
  • Commit- The action of submitting files to the local repository.
  • Fetch- The action of fetching the remote update.
  • Merge- The action of merging branches.
  • Pull(Fetch+Merge)- The action of fetching and merging in one shot.
  • Push- The action of moving the local commit to remote repository.
  • Remote- The remote location of the repository.
  • SHA- Unique identification key of a commit.
  • Head- The commit where working space of repository pointing to.
  • Branch- A version of a repository that diverges from the main working project.

Hope you got an idea about version control system and why GIT is called as distributed version control system. From the next part, I will show you the list of GIT operations we can do in android studio IDE.

Next part,

Thanks for reading.

--

--

Rajkumar Srinivasan
IVYMobility TechBytes

Android Apps Developer - Passionate about mobile development and learning.