Basic commands in git!


Git is distributed version control system. It is useful to work with open source platforms like GitHub, GitBook etc. There are different commands to use it properly. Let’s enlist basic commands:

git init

git remote add origin < remote_repository_url >

git remote -v

git add < file_name >

git status

git pull origin master

git commit -m "< commit_message >"

git log

git push -u origin master

git branch -a

git branch

git branch < branch_name >

git checkout < switching_to_branch_name >

git branch --merged

git merge < branch_name_to_merge_in_master >

git reset

git reset < file_name >

git clone < remote_repository_url > < directory_name >

Just create one folder on your local machine. Now open your GitHub account and create new repository. Perform each and every command. You may not understand what is going on. Don't worry, just go through all commands randomly. Read errors and get familiar with all of the above commands. We will see use of each of the above commands and how to use them all while managing project on GitHub.

Thank you,

© Ganesh Hubale. Built using Pelican Share: Facebook Twitter