6 Most Used Git Commands

Recently I've looked through the history of my GIT commands. What I've found is that from the whole range of GIT actions I use these 6 most of the time:

  • git checkout -b branch_name
    when starting working on new feature or bug
  • git diff while reviewing what should go to the commit
  • git add * while committing
  • git commit -m "comment"
  • git merge origin/branch_name before pushing or just update my branch with latest changes
  • git push --set-upstream origin branch_name for pushing changes to server

Of course clone, rebase, and other GIT commands are used when necessary. But surprisingly, for effective work these six are completely enough.

Alex Netkachov

Alex Netkachov

Alex likes functional programming and algorithms. Apart from programming, his favourites are walking with his family in the parks and national trails and reading about universe and history.

Read More