Git Version Control System

Git Version Control System

When we working on Big project and if team size is big then Git is very useful version controlling system to avoid code conflicts, Maintain releases, distributed revision control, source code management. Version controlling very important in project to keep project healthy state and save time of manual work.

What is git?

Git is nothing but changes tracking versioning system in project files. Multiple people can work in same files it is difficult to manage and Git is the best to track everything.Git is a distributed revision control and source code management system. Git was initially created and developed by Linus Torvalds for Linux kernel development in 2005.

Benefits of Git:

  • We can use branching concept to work.
  • Made a change to code, realised it was a mistake and wanted to revert back.
  • We can revert mistaken changes and no need to keep files history manual
  • We can maintain multiple versions of applications.
  • We can see the difference between two (or more) versions of your code.
  • We can keep updated working branch with development/Master branch
  • You can review the history of some code.
  • We can merge multiple branches into single branch.
  • We  can share our code, or let other people work on our code
  • We can see how much work is being done, and where, when and by whom with detail.
  • Resolve conflicts is very easy because git will display changes of both versions.

Git Important Commands List:

  • git config: Sets configuration values for your user name, email, gpg key, preferred diff algorithm, file formats and more.
  • git init: Initializes a git repository – creates the initial ‘.git’ directory in a new or in an existing project.
  • git clone: Makes a Git repository copy from a remote source and adds the original location as a remote so you can fetch from it again and push to it if you have permissions.
  • git add: Adds files changes in your working directory to your index.
  • git rm: Removes files from your index and your working directory so they will not be tracked.
  • git commit: Takes all of the changes written in the index, creates a new commit object pointing to it and sets the branch to point to that new commit.
  • git status: Shows you the status of files in the index versus the working directory.
  • git branch: Shows you git branches list
  • git checkout: You can check out a different branch.
  • git merge: Merges one or more branches into your current branch and automatically creates a new commit if there are no conflicts.
  • git reset: Resets your index and working directory to the state of your last commit basically .
  • git fetch: Fetches all the objects from the remote repository that are not present in the local one.
  • git pull: Fetches the files from the remote repository and merges it with your local one.
  • git push: Pushes all the modified local objects to the remote repository and advances its branches.
  • git remote: Shows all the remote versions of your repository.


要查看或添加评论,请登录

Sagar Patil的更多文章

社区洞察