Skip to content

Conversation

@giordano
Copy link
Contributor

Description

git reset --hard <remote> isn't a correct command, the argument of git reset must be a tree-ish, which a remote name alone isn't.

In some cases this command fails with

fatal: ambiguous argument 'origin': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

`git reset --hard <remote>` isn't a correct command, the argument of `git reset` must be a tree-ish, which a remote name alone isn't.

In some cases this command fails with
```
fatal: ambiguous argument 'origin': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
```

Signed-off-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
Copy link
Member

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a GREAT catch! ... @MoralCode : I think this could be one small thing that fixes a few repos that appear stuck; Though my testing is showing mostly the large repos just take large time.

Copy link
Contributor

@MoralCode MoralCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, basic testing seems to suggest this at least doesnt cause any adverse effects (and @giordano has tested it on their system too).

@MoralCode MoralCode merged commit 60138d0 into chaoss:main Oct 15, 2025
10 checks passed
@giordano giordano deleted the patch-1 branch October 15, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants