Ports tree have been migrated to git
Kurt Jaeger
pi at freebsd.org
Sat May 1 20:08:54 UTC 2021
Hi!
> > Right now, for reasons that are unclear to me, I still have some
> > local commit hanging around in that tree that I can't get removed.
[...]
> > Can someone please help me understand how to just get rid of
> > some commit not yet pushed ?
> git reset --hard HEAD^
>
> removes the last commit from the branch you have checked out.
Ok, I applied this once and had the revert of my local commit
removed.
I then applied it a second time, and now a
git show
displays me the
commit 9df78543e018a28c73fc97caff2c3ac9cc7b62f7
(the transcode revert from se@)
as the last uncommitted (?) change in my poudriere ports tree.
I expected 'git show' to return nothing, so that I know that
my tree is in sync with the remote tree.
> You can put
> any rev in place of HEAD^ if you know that is where you want to roll back
> to.
I just want to be back in the state where git show does not show
any changes 8-}
> You might use "freebsd/main" to reset to upstream (assuming you use the
> freebsd origin convention).
I think I follow that convention, but:
git reset --hard freebsd/main
fatal: ambiguous argument 'freebsd/main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
> Also, git reflog will remember, for a while, all the branch moves and you
> can use that to recover those local commits.
So reflog showed:
[...]
01fbe73ae HEAD@{14}: reset: moving to HEAD
01fbe73ae HEAD@{15}: revert: Revert "net/dante: update 1.4.2 -> 1.4.3"
1f182d137 HEAD@{16}: reset: moving to HEAD
1f182d137 HEAD@{17}: reset: moving to HEAD
and I tried to get to the state @ 1f182d137:
which still is not the state I want to be in, because now git
shows me
1f182d137defe95f4b4b46a3003f203957021a9d
again. I'm really lost here 8-( Looks more and more like
https://xkcd.com/1597/
--
pi at FreeBSD.org +49 171 3101372 Now what ?
More information about the freebsd-git
mailing list