-
Wiki pageNo response Subcommandhide DescriptionI forgot how this worked (with hg/branchless style) but I now have this very long and completely irrelevant history What is the best practice for just getting to showing "main" only when you are on the master/main branch and not on a untracked or dev branch?
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Generally speaking, hidden commits are not visible in the smartlog unless they have a visible descendant. In your case, this might mean that a branch is pointing into those commit stacks. You could delete the (local) branch in that case. See also https://github.com/arxanas/git-branchless/wiki/Command:-git-smartlog#which-commits-are-visible You can provide a general revset to |
Beta Was this translation helpful? Give feedback.
-
Ah, thanks, but yes, I think that's my point. In a repo, most of commits are ancestors of main, and if this is marked as a default in a branchless style smartlog, then you don't expect it to list all of them. In this case, it's showing all my commits, since they are all ancestors of main. I tried hiding them manually, without success. Is this a bug? |
Beta Was this translation helpful? Give feedback.
-
Ah, I see. I thought if I manually hid those refs, they would go away,
regardless of git branches tagging them. Thanks for clarifying.
…On Sat, Feb 17, 2024 at 8:38 PM Waleed Khan ***@***.***> wrote:
The smartlog shows that there are branches pointing to those commits (or
their descendants), so they are visible by default:
: x 064bcdf 37d (manually hidden) (redacted-ref-1) xxxx xxxxxxxxx xxxx xxx xxxxxx xxxxxxxxxxxxx xx xxxxx xxxxxxx
—
Reply to this email directly, view it on GitHub
<#1218 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB776WO3F5BYIF4ZWGGTNBTYUGATHAVCNFSM6AAAAABDEEHV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKMBUG43DC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Oh and there is a "-D" option for hide. Okay, that's what i needed to do.
On Sun, Feb 18, 2024 at 12:30 AM Peter Maresh ***@***.***>
wrote:
… Ah, I see. I thought if I manually hid those refs, they would go away,
regardless of git branches tagging them. Thanks for clarifying.
On Sat, Feb 17, 2024 at 8:38 PM Waleed Khan ***@***.***>
wrote:
> The smartlog shows that there are branches pointing to those commits (or
> their descendants), so they are visible by default:
>
> : x 064bcdf 37d (manually hidden) (redacted-ref-1) xxxx xxxxxxxxx xxxx xxx xxxxxx xxxxxxxxxxxxx xx xxxxx xxxxxxx
>
> —
> Reply to this email directly, view it on GitHub
> <#1218 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AB776WO3F5BYIF4ZWGGTNBTYUGATHAVCNFSM6AAAAABDEEHV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKMBUG43DC>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***
> com>
>
|
Beta Was this translation helpful? Give feedback.
-
It would be cool to have a configuration to help do this for you when it
gets in this state for those of us now living in a "create branch for
issue" github world. It would basically just cleanup and hide branches for
committed PRs.
On Sun, Feb 18, 2024 at 12:36 AM Peter Maresh ***@***.***>
wrote:
… Oh and there is a "-D" option for hide. Okay, that's what i needed to do.
On Sun, Feb 18, 2024 at 12:30 AM Peter Maresh ***@***.***>
wrote:
> Ah, I see. I thought if I manually hid those refs, they would go away,
> regardless of git branches tagging them. Thanks for clarifying.
>
> On Sat, Feb 17, 2024 at 8:38 PM Waleed Khan ***@***.***>
> wrote:
>
>> The smartlog shows that there are branches pointing to those commits (or
>> their descendants), so they are visible by default:
>>
>> : x 064bcdf 37d (manually hidden) (redacted-ref-1) xxxx xxxxxxxxx xxxx xxx xxxxxx xxxxxxxxxxxxx xx xxxxx xxxxxxx
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#1218 (reply in thread)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AB776WO3F5BYIF4ZWGGTNBTYUGATHAVCNFSM6AAAAABDEEHV7CVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKMBUG43DC>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***
>> com>
>>
>
|
Beta Was this translation helpful? Give feedback.
I usually use
git sync
to clean up my merged branches (but it doesn't currently work for squash-merges).