What is the most basic Git workflow that you can use every day?

Experience Level: Junior
Tags: Git Source control

Answer

Every day, you usually use the following git commands:

  • git pull (or git fetch and git merge) - get changes of other team members from the remote repository and merge them into your current branch
  • ...do some changes...
  • git status - see what are the changes in your workspace
  • git add . - add all changes to index (staging area)
  • git commit -m "Description of your changes" - commit changes from index (staging area) to your local repository
  • git push - send all changes from your local repository to the remote repository
Related Git job interview questions
Git for beginners
Git for beginners

Are you learning Git? Try our test we designed to help you progress faster.

Test yourself