Git - The most common git commands in the day-to-day work
We use git commands in the day to day work, below are the most common git commands I could think of.
- Create a new branch
- git branch <branchName>
- Switch to the new branch
- git checkout <branchName>
- Create a new branch and switch to it
- git checkout -b <branchName>
- Track updates from remote branches but not pull in
- git fetch
- list all branches locally
- git branch
- list all branches remotely
- git branch -r
- pull from pointing remote branch
- git pull
- pull from the remote branch
- git pull origin <branchName>