Today we will be looking at the basic git commands that I use majorly.

  1. git add – for the addition of a file/files/folder under the version control.

  2. git commit - to stage the changes
    -a -m –amend - to change the last git message

  3. git pull – to get the changes from the upstream repository to your local environment.

  4. git push – to send changes to the upstream repository

  5. git clone – copy a repository from upstream to your local system.

  6. git checkout – useful when changing to another branch, also get the change from upstream repository. -b – creates a new repository.

  7. git merge – useful when we want to combine two branches in which there are different code present.

  8. git rebase – useful when move the HEAD directly to the latest commit.

  9. git cherry pick --commitid – useful when we want to pick a commit from one branch and apply it to another