Top 7 must used Git commands

must used Git commands

Git is a version control system founded by Linus Torvalds, the creator of Linux in 2005.

Git is widely used in the world by individuals and corporations to facilitate collaboration on projects.

Git has about 160 commands but in this post, i will share the top most used commands by both beginners and professionals alike.

I am under the assumption that you have already have git installed on your PC, but if not you can find how to install git on your system here https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

  1. git init : This will create a new git repository
  2. git add : This will add new files to our repository , to add all the new files use git add -A
  3. git commit: After adding files we need to save them, to do so , use git com, mit -m “Commit message”
  4. git push: This allows us to send our changes to the remote server using git push -u origin master
  5. git pull: This allows you to fetch and download content from a remote repository and immediately update the local repository to match that content
  6. git log: git log allows you to see all your commit history so as to make necessary changes.
  7. git revert: These enables you to undo and revert changes one has made in case of errors

Leave a Reply

%d bloggers like this: