What Is Git And And How It Is Useful For Developers In An Organization.
Travel
Git:
There are many version control systems available like SVN, Mercurial, Fossil etc.., Git is one of an Open source distributed version-control system abbreviated as (VCS).
Version Control System:
Version control system is used as tracking system to track changes in the source code during software development process.
Using this version control system, more than one people or group of people can work in the same project source code at a same time.
Let’s say you have your own source version. You are sending it other user. They will make changes and save it. Now there are two versions. Now you can integrate that changes into your version. Now the version changed as single again.
The above action can be done by two actions push and pull.
“Even a space and permission of the files will be tracked by Git”
Once you organize the files and tell the git to track, Git will start tracking the files for changes. It will track the changes you made and the file name and the user who changed it. Finally user can see those changes and confirm before push that changes. While push that changes, users are allowed to add comment/note of that changes as reference.
Repositories:
We all may have a question, Where the pushed files are going and from where I am getting changed files from other users?
You should maintain a source repository as a centralized source storage repository. So whenever an user pushed a new committed change, that will comes into the repository. In the same way, every pull will get the recently updated changes from the repository.
GitHub and Bitbucket are the most commonly used repositories.
Commandline and UI:
Continue Reading..,
Git commands are available for command line actions. Also available as UI apps like Smartgit.
Git Clone is used to clone an existing remote repository into your system.
Git is structured as tree branch model. Default branch is named as “master branch”. You can create new branch in any name.
Git checkout is used to switch between branches.
Git push used to push the changes that you made. Before push you should acknowledge with your changes by committing it. Git commit is used to commit your codes. When you commit, you can add notes as reference of what have been changed and why it has changed. Once you commit, a commit ID will get generated. That commit ID is an identification number of that particular commit, that will have the information of the changes made in the files with date specified. Each commit will have unique number.
Git pull used to integrate changes from other users into your working branch. Before pull, ensure you have committed changes if you have done any then pull the repository for updated source.
Git merge is used to merge two branches.
You can add security by setting master password that will be asked every day when you start using Git.
Git status is used to find the changes you have made with your files.
You can exclude files and folders from git tracking. You can mention the files and folders name inside the file called “.gitignore” to exclude the files from change tracking. The files/folders added in the .gitignore will not be tracked by git for changes unless you remove it from there. So if you want any eclusion you make use of this option.
Git log will show you all the commits have been done until now.
Like this you have many more features in Git. That is the reason why Git is preferred by most users.
Hope you understand Git and its usage.
Thank you