What is Git?
Git is the most commonly used version control system in software industry.It tracks the changes that you make to the files and also makes collaboration easier within the team.
Below are the list of basic git commands that everyone should understand.
git config
- git config -global user.name "[give your name]"
- git config -global user.email "[give your email]"
git init
- git init "[repositoryName]"
git clone
- git clone "[repositoryURL]"
git add
- git add "[FilePath]"
- git add *
git commit
- git commit -m "Commit message...."
git status
- git status
git checkout
- git checkout [branchName] The command is used to switch from one branch to another.
- git checkout -b [branchName] The command is used to create new branch in git
git pull
- git pull The command is used to fetch latest changes on repository remote server to your working directory
git push
- git push origin [branchName] The command is used to push the committed changes into remote server of the git branch
git merge
- git merge [branchName]