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
To fast-forward a local branch to its remote status without switching to it (reducing the checkout time and not triggering unrequired fetching), the best way is using git push . origin/main:main, for example. This is safer than just git branch -f main origin/main or git fetch . origin/main:main as it stops in case of non fast forward update. Unfortunately, while this method works correctly on other git repos, it doesn't work when using Scalar (at least in Office monorepo). Instead, it just hangs forever.
Unregistering scalar and running with --no-verify didn't help, so it doesn't look like some hook that interferes with the process. Running with --verbose just adds Pushing to . to the output, and nothing else.
Running in dry run mode seems to understand correctly what should be done, for example (actual SHA-1 redacted):
git push -n . origin/main:main
To .
xxxx..yyyy origin/main -> main
What did you expect to occur after running these commands?
This command should fast-forward a local branch to its remote status without switching to it (reducing the checkout time and not triggering unrequired fetching).
What actually happened instead?
It hangs forever (forever == a few minutes, after that I just ^C it). Example for output (2 last lines are after ^C):
F:\src>git push . origin/main:main
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
If the problem was occurring with a specific repository, can you specify
the repository?
Public repo: insert URL here
Windows monorepo
Office monorepo
Other Microsoft-internal repo: insert name here
Other internal repo.
The text was updated successfully, but these errors were encountered:
To fast-forward a local branch to its remote status without switching to it (reducing the checkout time and not triggering unrequired fetching), the best way is using
git push . origin/main:main
, for example. This is safer than justgit branch -f main origin/main
orgit fetch . origin/main:main
as it stops in case of non fast forward update. Unfortunately, while this method works correctly on other git repos, it doesn't work when using Scalar (at least in Office monorepo). Instead, it just hangs forever.Unregistering scalar and running with
--no-verify
didn't help, so it doesn't look like some hook that interferes with the process. Running with--verbose
just addsPushing to .
to the output, and nothing else.Running in dry run mode seems to understand correctly what should be done, for example (actual SHA-1 redacted):
or closed issue matching
what I'm seeing, including in the
git-for-windows/git
tracker.Setup
microsoft/git
are you using? Is it 32-bit or 64-bit?Are you using Scalar or VFS for Git?
Scalar
Win 11 22H2, 64-bit
to the issue you're seeing?
** insert your response here **
Details
CMD (tested both using Windows Terminal and the default conhost)
Minimal, Complete, and Verifiable example
this will help us understand the issue.
This command should fast-forward a local branch to its remote status without switching to it (reducing the checkout time and not triggering unrequired fetching).
It hangs forever (forever == a few minutes, after that I just ^C it). Example for output (2 last lines are after ^C):
If the problem was occurring with a specific repository, can you specify
the repository?
The text was updated successfully, but these errors were encountered: