Sobes.tech
Junior — Middle

What are the main Git commands you know and can use in daily work?

sobes.tech AI

Answer from AI

Main Git commands that are frequently used in daily work:

  • git clone <url> — cloning a remote repository.
  • git status — shows the current state of the repository and changes.
  • git add <file> — adds changes to the index (staging area).
  • git commit -m "message" — saves changes to the local repository.
  • git pull — fetches and merges changes from the remote repository.
  • git push — pushes local commits to the remote repository.
  • git branch — shows the list of branches.
  • git checkout <branch> — switches between branches.
  • git merge <branch> — merges the specified branch into the current one.
  • git log — views the commit history.

These commands cover the main operations: obtaining code, making changes, synchronizing with the remote repository, and managing branches.

What are the main Git commands you know and can use… - sobes.tech