Git is one of the best open-source version controlling tool and widely used in web development companies. It consists of many features along with their respective commands which help the developer to maintain their code clean and separated from others work.

Let's see some basic command which is frequently used.

  1. Pull request

When we need the updated files from the server to our local machine the PULL request is used. It always a best practice to check updated files from the server. PULL to have the updated code and on sync with the team

2. Adding files

3. Pushing Updated/Modified files

4. Branching and Merging

This feature is used when you are not sure about pushing files on the mainstream repository as your developing new feature and code is not yet completed or tested at your local machine.

Just now you merge your branch code to the main source. If you are done with branch and no further requirements of it, then delete it from local as well as from remote machine.

5. Rewrite commit message

If you want to correct previously committed message then follow below steps

one editor will open

type i, now this will allow you to insert a new commit statement.

Type new comment, press ‘Esc’ and type ‘:wq’ and press enter.

6. Revert up to specific version

This comes into the picture when something wrong happens to your code and you want to get back to its last stable version.

Warning: Use this command wisely. As it will change your code and remove dependencies from project

I hope you guys got a basic understanding of git and you will implement it to your day to day coding practice.

Let me know in the comment section if this blog is relevant or need more description.

You can visit my git account where I normally put my daily work. Your contribution to my public repository is always welcomed.

Other articles

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store