Git is a tool to colaborate in the modification of text files. In this post we will see a small introduction.
Main characteristics
Git is a very complete tool but it has two main uses: version generation and change control.
Version generation
Once we have finished editing our documents and we decide to generate a version, we add a version tag to mark the state of the documents. After that we can continue editing them, and the version will be stored (as a photography that was taken in that moment)
Change control
Git allows us to review what changes has been doing to the documents. Doing so, every person that contributes in the edition of those documents can see his own document and the changes made by other people.
Similar technologies
Git is designed as a distributed system. This means that every user has a copy of the data and he can work off-line with it, and upload it to the server whenever he wants. On the contrary, with centralized systems, users need to be connected to the data server to upload the information
Some similar technologies are:
- Subversion (centralized)
- Mercurial (distributed)
- CVS (centralized)
- StarTeam (centralized)
- ClearCase (centralized)
Important concepts
In order to understand how Git works, we need to talk about severa important concepts:
Localizations
There are three main localizations:
- Working local directory: It is the local folder where we work in out local disk.
- Stage: It is a place where modified documents are stored and ready to upload to the remote server.
- Server remote directory: It is the place of the Git server (also called “repository”) where other people can review or changes.
Operations
There are several basic operations to use in Git. There are more commands, but these are the basic ones:
- Status: Using this command we will know the status of our documents (if they are on the stage or not).
- Add. It is useful for adding to the stage one or more files.
- Commit: We can use it to take a photo to the stage (it is a group of changes).
- Push: We use it to upload to the server the photos that we have not uploaded previously.
- Pull: It is useful for downloading the photos from the server (repository) to out local disk.
So, what do you think ?