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