Everything on How To Use Git
What is GIT?
The Git may be a distributed version control system for tracking changes in ASCII text files during software development, especially for android developers while developing an android application on a large scale.
It is designed for coordinating work among programmers, project managers, and other stack holders but it is often wont to track changes in any set of files. Its goals include speed, data integrity, data transfer, and support for distributed, non-linear workflows.
How to use GIT?
GIT – version control
- Software that keeps track of changes
- 2005, Open source, cross-platform
- Especially text changes made in files
- Version1, version2, version 3
- It Allows to
- Move back and forth between different versions
- Compare different version
- To see what changed between all
- It is mentioned as Version system ( VCS)
- Since it’s 90%-95% used for managing ASCII text file
- It is termed as ASCII text file Management (SCM)
Central repository – history
- Source Code system ( SCCS)
- 1972 by AT&T. Closed Source but free with and for UNIX Only
- Revision system ( RCS)
- 1982, open-source, cross-platform
- The problem with both the above VCS are
- They only allowed figuring with one file and not sets of files
- An only a single user can work on a file at a time
- Concurrent Versions System ( CVS)
- 1986-1990 open source
- We can store our project on a foreign server (aka repository) and quite one user can work on the same file at the same time
- Apache Subversion (SVN)
- It is far faster than CVS
- Track changes on text files also as non-textual files (e.g. Graphics)
- It keeps track of changes within the Project directory as an entire.
- All of the above use Central code repository mode.
- I.e. single central repository
- Checkout from it, make our changes, and submit back to the most repository.
- Others pull right down to keep update with the changes people made.
Git- distributed version control
- Git may be a distributed version control.
- Different users maintain their own repositories, rather than performing from a central repository.
- The changes will be stored in the form of “Changesets” or “patches”
- Tracks changes and not versions
- Distributed Version Control
- No single master repository; just man working copies
- Each with their own combination of changesets.
- Consider changes to a document as sets A, B, C, D, E, F
- Repo 1: A, B, C, D, E, F
- Repo 2: A, B, C, D
- Repo 3: A, B, C, E
- Repo 4: A, B, E, F
- None of the above are right and not any of them is wrong
- They are all valid repositories with different changes.
- Conventionally, we consider one because of the master repository for one project in Git that each one user commits their changes to.
GIT – installation (on Windows)
- Git website
- Download and install it
- Git Bash, a terminal almost like that we have in UNIX
- Open it
- To check where git is installed and where it is located use the subsequent command
- Which git
- A version of the git installed
- Git –version
- Check the assistance manual
- Get help
Git – configuring git
- The separate complete manual has been uploaded for Git configuration with GitLab.
Git – clients
- There are multiple clients and servers that facilitate Git. The foremost famous ones are:
- GitHub (Awesome, but now occupied by Microsoft)
- GitLab (we would be using)
Gitlab – creating a repository
- Creating a replacement Project
- This shall create an empty project for you
- Configure Source Tree (as a GitLab Client on your system) (procedure As shown in “Using GitLab manual)
- Clone that vacant project (As shown in “Using GitLab manual)
- Make an Android Project therein Cloned Folder on your laptop
- And then commit the changes using Source Tree with a message
- Push the changes to the remote repository