threads / discuss / 60274

Feature Request - Unique commits list

Subject: Feature Request - Unique commits list

## tl;dr

3 messages between Sep 28, 2023 and Sep 28, 2023.

replies: 2people: 3as markdown or json

Saurabh Sonar· Sep 28, 2023, 08:16 UTC · lore

After merging the master branch into my local it is hard to find my own commits in git history.

To solve this issue I suggest, There should be an option to find out which commits are only present in only current branch and not present in any other.

The user should be aware that if he deletes the branch some list of commits are not merged or present in any other branch and he is going to lose them forever.

Kristoffer Haugsbakk· Sep 28, 2023, 08:21 UTC · re: Saurabh Sonar · lore

Re: Feature Request - Unique commits list

On Thu, Sep 28, 2023, at 10:16, Saurabh Sonar wrote:
> The user should be aware that if he deletes the branch some list of
> commits are not merged or present in any other branch and he is going
> to lose them forever.

That already happens now, though? (Well, not “forever” because of GC and whatnot.) You have to force the deletion with `-D` if the branch is not in the “upstream” branch.

-- 
Kristoffer Haugsbakk
Junio C Hamano· Sep 28, 2023, 14:07 UTC · re: Saurabh Sonar · lore

Re: Feature Request - Unique commits list

Saurabh Sonar <saurabh.sonar120@gmail.com> writes:
> After merging the master branch into my local it is hard to find my
> own commits in git history.

I suspect the above may be the other way around (i.e., after the upstream takes some but not all of my changes into their 'master' branch, I want to find out what remaining topics from me are still not accepted by them), but anyway, doesn't something along the lines of

	$ git log --branches --not origin/master
work for you?  It asks
 * Please list commits ("git log")
 * The commits to be listed should be discovered by traversing the
   history starting from my branch tips ("--branches")
 * But I am not interested in those commits that can be reached from
   the 'master' branch of my upstream ("--not origin/master").

← back to recent threads