Sobes.tech
Junior — Middle

Name the key commands used in the Git version control system.

sobes.tech AI

Answer from AI

Key Git commands that are frequently used:

  • git init — initialize a new repository.
  • git clone <url> — clone a remote repository.
  • git status — shows the current state of the repository.
  • git add <file> — add changes to the staging area.
  • git commit -m "message" — commit changes with a message.
  • git push — push commits to a remote repository.
  • git pull — fetch changes from a remote repository and merge.
  • git branch — show branches or create a new one.
  • git checkout <branch> — switch to another branch.
  • git merge <branch> — merge the specified branch into the current one.

Example:

git init
git add .
git commit -m "Initial commit"
git push origin main
Name the key commands used in the Git version control… - sobes.tech