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
After I rewrite and force-push to a remote, I can no longer git subrepo pull --method rebase to rebase my local branch on the new remote branch.
> git subrepo pull --method rebase 3rdparty/rtaudio
git-subrepo: Local repository does not contain 72d703e77db60c9faf31a5b78ddb272d08401065. Try to 'git subrepo fetch 3rdparty/rtaudio' or add the '-F' flag to always fetch the latest content.
> git subrepo branch 3rdparty/rtaudio/
git-subrepo: Local repository does not contain 72d703e77db60c9faf31a5b78ddb272d08401065. Try to 'git subrepo fetch 3rdparty/rtaudio' or add the '-F' flag to always fetch the latest content.
72d703e77db60c9faf31a5b78ddb272d08401065 is the latest remote commit seen from a prior fetch/pull. However I have rebased the rtaudio repository on upstream and force-pushed to the remote, removing 72d703e from the master branch. Now git subrepo pull fails, even though a regular git pull --rebase is perfectly capable of rebasing onto a force-pushed remote.
git subrepo pull --force [--method rebase] 3rdparty/rtaudio works (--method rebase is ignored), but discards all changes I made locally but haven't run git subrepo push on. If I've made the changes recently and haven't pushed them to master, I have to checkout a commit from before the changes, then cherry-pick the commits after running git subrepo pull --force. If I've already pushed the commits and don't want to force-push my local repo, git subrepo pull --force forces me to lose the changes in the process (I can try to reapply them afterwards).
Currently using git subrepo 0.4.3 (latest release, basically latest commit).
The text was updated successfully, but these errors were encountered:
I tried "checkout a commit from before the changes, then cherry-pick the commits after running git subrepo pull --force". I can't push the commits.
nyanpasu64@ryzen ~/code/exotracker-cpp (fix-rtaudio-pipewire)> git subrepo fetch 3rdparty/rtaudio
git-subrepo: There is already a worktree with branch subrepo/3rdparty/rtaudio.
Use the --force flag to override this check or perform a subrepo clean
to remove the worktree.
nyanpasu64@ryzen ~/code/exotracker-cpp (fix-rtaudio-pipewire) [1]> git subrepo fetch --force 3rdparty/rtaudio
git-subrepo: Invalid option '--force' for 'fetch'.
turns out you need to git subrepo clean 3rdparty/rtaudio, git subrepo fetch 3rdparty/rtaudio, then you can push.
The `push` command accepts the `--all`, `--branch=`, `--dry-run`, `--force`,
`--merge`, `--rebase`, `--remote=`, `--squash` and `--update` options.
and if you try --rebase or --dry-run it doesn't work
After I rewrite and force-push to a remote, I can no longer
git subrepo pull --method rebase
to rebase my local branch on the new remote branch.72d703e77db60c9faf31a5b78ddb272d08401065
is the latest remote commit seen from a prior fetch/pull. However I have rebased the rtaudio repository on upstream and force-pushed to the remote, removing72d703e
from themaster
branch. Nowgit subrepo pull
fails, even though a regulargit pull --rebase
is perfectly capable of rebasing onto a force-pushed remote.git subrepo pull --force [--method rebase] 3rdparty/rtaudio
works (--method rebase
is ignored), but discards all changes I made locally but haven't rungit subrepo push
on. If I've made the changes recently and haven't pushed them to master, I have to checkout a commit from before the changes, then cherry-pick the commits after runninggit subrepo pull --force
. If I've already pushed the commits and don't want to force-push my local repo,git subrepo pull --force
forces me to lose the changes in the process (I can try to reapply them afterwards).Currently using git subrepo 0.4.3 (latest release, basically latest commit).
The text was updated successfully, but these errors were encountered: