# Feature Request - Unique commits list

3 messages from 2023-09-28 to 2023-09-28. Participants: Saurabh Sonar, Kristoffer Haugsbakk, Junio C Hamano.
Thread: https://gitlist.dev/t/60274

## Saurabh Sonar, 2023-09-28 08:16

Subject: Feature Request - Unique commits list
Message-ID: <CAJ-L=uAjXB67Zx1BPpdJYF_y1RS+UqwpyTMF1F4o3yO+1o76vg@mail.gmail.com>
URL: https://gitlist.dev/e/CAJ-L%3DuAjXB67Zx1BPpdJYF_y1RS%2BUqwpyTMF1F4o3yO%2B1o76vg%40mail.gmail.com

```
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, 2023-09-28 08:21

Subject: Re: Feature Request - Unique commits list
Message-ID: <8e315d35-7076-47e8-b3a5-6330587325e8@app.fastmail.com>
URL: https://gitlist.dev/e/8e315d35-7076-47e8-b3a5-6330587325e8%40app.fastmail.com
In-Reply-To: <CAJ-L=uAjXB67Zx1BPpdJYF_y1RS+UqwpyTMF1F4o3yO+1o76vg@mail.gmail.com>

```
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, 2023-09-28 14:07

Subject: Re: Feature Request - Unique commits list
Message-ID: <xmqqbkdml7b8.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqbkdml7b8.fsf%40gitster.g
In-Reply-To: <CAJ-L=uAjXB67Zx1BPpdJYF_y1RS+UqwpyTMF1F4o3yO+1o76vg@mail.gmail.com>

```
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").


```
