From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Eddie Ridwan <eddie.ridwan@gmail.com>, git@vger.kernel.org
Subject: Re: Git push subtree fail unknown revision or path possibly due to missing git-subtree-split commit
Date: Wed, 6 Oct 2021 22:52:27 -0400 [thread overview]
Message-ID: <61ee8bec-1e6c-e3c7-2cef-7520f376c18c@gmail.com> (raw)
In-Reply-To: <CANcBuaZstymNMvbPX553kgr=FsrFFcDEivfiDPsPe3uyGLb78g@mail.gmail.com>
Hi Eddie,
Le 2021-10-05 à 00:53, Eddie Ridwan a écrit :
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> git pull/push subtree as normal, although it is possible that one of
> the contributors to the subtree repo may have done a force push.
I think that is indeed what happened (see below).
>
> What did you expect to happen? (Expected behavior)
> git push subtree to update the remote subtree repo.
>
> What happened instead? (Actual behavior)
> Failed to update the remote subtree repo. Error message:
>
> fatal: ambiguous argument
> '3f44cc87ceb87df1d9171096596a824fc3050a27^{commit}': unknown revision
> or path not in the working tree.
> Use '--' to separate paths from revisions, like this:
> 'git <command> [<revision>...] -- [<file>...]'
> could not rev-parse split hash
> 3f44cc87ceb87df1d9171096596a824fc3050a27 from commit
> 8577911bf6183497cc246aa620e7be1b6becec29
It would be easier to help you if you gave a URL for your repository :)
(or at least for the subtree). I managed to find you Stack Overflow
post [1] by Googling these commit hashes (!). Fortunately you mention
the subtree URL in your question, and that's enough to go by in this case.
>
> What's different between what you expected and what actually happened?
>
> Failed to update the subtree repo, as expected;
>
> Anything else you want to add:
>
> I am not able to find the commit/hash
> 3f44cc87ceb87df1d9171096596a824fc3050a27 in the repo. In gitx, I can
> see that the commit is a git-subtree-split. But it appears to no
> longer exist in the repo.
Here, I'm assuming that by "in the repo" you mean in a clone of the subtree
repo, i.e. a clone of https://github.com/OpenSID/tema-natra.
Indeed the commit with hash 3f44cc87ceb87df1d9171096596a824fc3050a27 does not exist in
such a clone. But, it still exists on GitHub:
https://github.com/OpenSID/tema-natra/commit/3f44cc87ceb87df1d9171096596a824fc3050a27
GitHub almost never removes commits in practice. This is good news, because
it means you can fetch it locally.
> How can I bypass or recover from this apparent missing commit? Any
> help would be greatly appreciated.
The git-subtree script does need the commit locally to work. So, just fetch
the commit by its hash. In your project repository (the one which uses tema-natra as
a subtree), run:
git fetch https://github.com/OpenSID/tema-natra.git 3f44cc87ceb87df1d9171096596a824fc3050a27
This will download the needed objects. After that, you *should* be able to
run your 'git subtree push' command.
Note: I think that the 'premium' branch (mentioned in your Stack Overflow question)
was indeed force-pushed, since 'git log --oneline dadcd0167^..' does not show the two
commits that appear in your image [2] that read "Update statistik_pengunjung.php"
Hope that helps,
Philippe.
[1] https://stackoverflow.com/questions/69431546/git-push-subtree-fail-unknown-revision-or-path-possibly-due-to-missing-git-subtr
[2] https://i.stack.imgur.com/1tMln.jpg
next prev parent reply other threads:[~2021-10-07 2:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 4:53 Git push subtree fail unknown revision or path possibly due to missing git-subtree-split commit Eddie Ridwan
2021-10-07 2:52 ` Philippe Blain [this message]
2021-10-07 5:43 ` Eddie Ridwan
[not found] ` <CANcBuaZmRj3tZqprNwjJatJ87F0vUVDKDRm5+OnOk_z3wqvJYg@mail.gmail.com>
2021-10-08 1:14 ` Philippe Blain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61ee8bec-1e6c-e3c7-2cef-7520f376c18c@gmail.com \
--to=levraiphilippeblain@gmail.com \
--cc=eddie.ridwan@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).