Skip to content
masterclass Buddy

DevOps · Command

git reset

Use Git on the command line to create a topic branch, commit documentation changes, and push them to the remote repository. Start by updating main, then stage and commit focused changes.

Last updated

Syntax

git checkout main
git pull origin main
git checkout -b YOUR-TOPIC-BRANCH
git add FILENAME [FILENAME...]
git commit -m "COMMIT MESSAGE"
git push --set-upstream origin YOUR-TOPIC-BRANCH

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • git checkout main
  • git pull origin main
  • git add
  • git reset HEAD FILENAME
  • git rm
  • git commit
  • git push

Source: Using Git on GitHub Docs - GitHub Enterprise Server 3.20 Docs. Checked 2026-11-03.