# RFC: git pull or git rebase?

3 messages from 2007-07-23 to 2007-07-23. Participants: Michael S. Tsirkin, Alex Riesen.
Thread: https://gitlist.dev/t/9164

## Michael S. Tsirkin, 2007-07-23 05:22

Subject: RFC: git pull or git rebase?
Message-ID: <20070723052223.GA20614@mellanox.co.il>
URL: https://gitlist.dev/e/20070723052223.GA20614%40mellanox.co.il

```
Hi!
I'm working on several kernel-related projects at the same time:
- some of them are small, and private, so I do a fetch
  and rebase to update to Linus' code, to keep history clean
- some of them are larger, and involve several other people,
  so I do git pull (the history is messy anyway)

Problem is, I get confused sometimes and do a git pull
instead of git rebase, or vice versa. Of course I can just
reset to ORIG_HEAD when I realise my mistake.

However, I wonder whether this happens to others, too.
Would it make sense to add a branch attribute that says
"do not pull this branch" or "do not rebase this branch"?
Maybe even make git do the right thing automatically,
so that git would look at this attribute and perform
pull or rebase as appropriate?

Thanks,

-- 
MST

```

## Alex Riesen, 2007-07-23 09:07

Subject: Re: RFC: git pull or git rebase?
Message-ID: <81b0412b0707230207k2fa33eb3hdc23319d1f8dbd80@mail.gmail.com>
URL: https://gitlist.dev/e/81b0412b0707230207k2fa33eb3hdc23319d1f8dbd80%40mail.gmail.com
In-Reply-To: <20070723052223.GA20614@mellanox.co.il>

```
On 7/23/07, Michael S. Tsirkin <mst@dev.mellanox.co.il> wrote:
> However, I wonder whether this happens to others, too.
> Would it make sense to add a branch attribute that says
> "do not pull this branch" or "do not rebase this branch"?
> Maybe even make git do the right thing automatically,
> so that git would look at this attribute and perform
> pull or rebase as appropriate?

If you have a recent enough git, it will refuse to pull into
a branch for which there is no configured remote branch.
Exactly for a reason like yours.

```

## Michael S. Tsirkin, 2007-07-23 09:31

Subject: Re: RFC: git pull or git rebase?
Message-ID: <20070723093142.GE20614@mellanox.co.il>
URL: https://gitlist.dev/e/20070723093142.GE20614%40mellanox.co.il
In-Reply-To: <81b0412b0707230207k2fa33eb3hdc23319d1f8dbd80@mail.gmail.com>

```
> Quoting Alex Riesen <raa.lkml@gmail.com>:
> Subject: Re: RFC: git pull or git rebase?
> 
> On 7/23/07, Michael S. Tsirkin <mst@dev.mellanox.co.il> wrote:
> >However, I wonder whether this happens to others, too.
> >Would it make sense to add a branch attribute that says
> >"do not pull this branch" or "do not rebase this branch"?
> >Maybe even make git do the right thing automatically,
> >so that git would look at this attribute and perform
> >pull or rebase as appropriate?
> 
> If you have a recent enough git, it will refuse to pull into
> a branch for which there is no configured remote branch.
> Exactly for a reason like yours.

Aha. I created the tree by git clone, so my master
is configured to merge from origin automatically.

-- 
MST

```
