You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid Git Command Syntax in resetting-a-branch.mdΒ #128704
In `docs/additional-material/git_workflow_scenarios/resetting-a-branch.md`, lines 9β17 provide an invalid Git syntax:
`git reset <base_branch> <origin_branch>` and `git reset stage master --hard`.
Running this command causes Git to throw an error (`fatal: ambiguous argument 'stage': unknown revision or path not in the working tree`). `git reset` cannot take two branch names
as positional arguments because it always acts on `HEAD`.
π― Goal
Provide beginners with accurate, working Git commands to reset a local branch to match another branch.
π‘ Possible solutions
Update the tutorial to show checking out / switching to the base branch first before running `git reset --hard <target_branch>`.
π Steps to solve the problem
- [ ] Create a branch `fix/reset-branch-command-syntax`.
- [ ] Update `resetting-a-branch.md` with accurate commands.
- [ ] Submit a pull request.
Activity
Adil-Khan-N commentedon Nov 19, 2026
I would like to take up this. \