9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] git/rebase for someone used to git pull --rebase
@ 2025-02-07 16:23 ron minnich
  2025-02-07 17:51 ` Jacob Moody
  0 siblings, 1 reply; 7+ messages in thread
From: ron minnich @ 2025-02-07 16:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

what I'm used to
I'm on branch x
git pull --rebase origin main

with 9front git
I'm on branch x
git/pull -f origin
git/rebase origin/heads/front

That does not look right. Reading /bin/git/rebase, I almost think I want to
do
git/branch heads/front
git/rebase heads/x

but I'm a bit uncertain. I'm not good with branches at the best of times.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-M018637da0f2026c26958a717
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1214 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] git/rebase for someone used to git pull --rebase
  2025-02-07 16:23 [9fans] git/rebase for someone used to git pull --rebase ron minnich
@ 2025-02-07 17:51 ` Jacob Moody
  2025-02-07 19:26   ` Ben Huntsman
  0 siblings, 1 reply; 7+ messages in thread
From: Jacob Moody @ 2025-02-07 17:51 UTC (permalink / raw)
  To: 9fans

On 2/7/25 10:23, ron minnich wrote:
> what I'm used to
> I'm on branch x
> git pull --rebase origin main
> 
> with 9front git
> I'm on branch x
> git/pull -f origin
> git/rebase origin/heads/front
> 
> That does not look right. Reading /bin/git/rebase, I almost think I want to do
> git/branch heads/front
> git/rebase heads/x
> 
> but I'm a bit uncertain. I'm not good with branches at the best of times.


I think what you're looking for is:
git/pull -f origin
git/rebase remotes/origin/$upstreambranch

git/branch -a will give you all the details about what remote branches we're tracking.

I don't tend to use our git/rebase much, I tend to just use git/log -se branchA..branchB or the inverse to
get the commit list and git/export and git/import by hand. Or stash my current branch, reset the one tracking
upstream and then go from there.


Thanks,
moody



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-Mf370c4581ed85ad438775722
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] git/rebase for someone used to git pull --rebase
  2025-02-07 17:51 ` Jacob Moody
@ 2025-02-07 19:26   ` Ben Huntsman
  2025-02-07 21:03     ` ron minnich
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Huntsman @ 2025-02-07 19:26 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]

In most repos, I just do something like:

git checkout master
git fetch --all
git pull          <-- Now I'm up to date with origin, presumably my fork on github, etc
git merge upstream/master     <-- Now I'm up to date with the project, assuming I added it as upstream
git checkout x    <-- the local branch I want to rebase
git rebase master <-- now it's rebased to the master

Wouldn't that work for you here too?

-Ben


________________________________
From: Jacob Moody <moody@posixcafe.org>
Sent: Friday, February 7, 2025 9:51 AM
To: 9fans@9fans.net <9fans@9fans.net>
Subject: Re: [9fans] git/rebase for someone used to git pull --rebase

On 2/7/25 10:23, ron minnich wrote:
> what I'm used to
> I'm on branch x
> git pull --rebase origin main
>
> with 9front git
> I'm on branch x
> git/pull -f origin
> git/rebase origin/heads/front
>
> That does not look right. Reading /bin/git/rebase, I almost think I want to do
> git/branch heads/front
> git/rebase heads/x
>
> but I'm a bit uncertain. I'm not good with branches at the best of times.


I think what you're looking for is:
git/pull -f origin
git/rebase remotes/origin/$upstreambranch

git/branch -a will give you all the details about what remote branches we're tracking.

I don't tend to use our git/rebase much, I tend to just use git/log -se branchA..branchB or the inverse to
get the commit list and git/export and git/import by hand. Or stash my current branch, reset the one tracking
upstream and then go from there.


Thanks,
moody



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-M57cbb0b0c0708356df2a8fb8
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 6135 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] git/rebase for someone used to git pull --rebase
  2025-02-07 19:26   ` Ben Huntsman
@ 2025-02-07 21:03     ` ron minnich
  2025-02-07 21:11       ` ron minnich
  0 siblings, 1 reply; 7+ messages in thread
From: ron minnich @ 2025-02-07 21:03 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 2805 bytes --]

I think you need to rephrase your commands in terms of 9front git. That's
my question. I have no question about how to do it with standard git.

re Jacob's example:
git/rebase remotes/origin/$upstreambranch

I'm still a bit lost on just where the commits end up. upstreambranch?
Looking at the source to git/rebase, I got a bit confused.
concrete example:
git/branch
heads/ron_nix
git/pull -f -u 9front
# ok now what?
git/rebase heads/ron_nix$remotes/front/front
?


On Fri, Feb 7, 2025 at 12:05 PM Ben Huntsman <ben@huntsmans.net> wrote:

> In most repos, I just do something like:
>
> git checkout master
> git fetch --all
> git pull <-- Now I'm up to date with origin, presumably my fork on github,
> etc
> git merge upstream/master <-- Now I'm up to date with the project,
> assuming I added it as upstream
> git checkout x <-- the local branch I want to rebase
> git rebase master <-- now it's rebased to the master
>
> Wouldn't that work for you here too?
>
> -Ben
>
>
> ------------------------------
> *From:* Jacob Moody <moody@posixcafe.org>
> *Sent:* Friday, February 7, 2025 9:51 AM
> *To:* 9fans@9fans.net <9fans@9fans.net>
> *Subject:* Re: [9fans] git/rebase for someone used to git pull --rebase
>
> On 2/7/25 10:23, ron minnich wrote:
> > what I'm used to
> > I'm on branch x
> > git pull --rebase origin main
> >
> > with 9front git
> > I'm on branch x
> > git/pull -f origin
> > git/rebase origin/heads/front
> >
> > That does not look right. Reading /bin/git/rebase, I almost think I want
> to do
> > git/branch heads/front
> > git/rebase heads/x
> >
> > but I'm a bit uncertain. I'm not good with branches at the best of times.
> 
> 
> I think what you're looking for is:
> git/pull -f origin
> git/rebase remotes/origin/$upstreambranch
> 
> git/branch -a will give you all the details about what remote branches
> we're tracking.
> 
> I don't tend to use our git/rebase much, I tend to just use git/log -se
> branchA..branchB or the inverse to
> get the commit list and git/export and git/import by hand. Or stash my
> current branch, reset the one tracking
> upstream and then go from there.
> 
> Thanks,
> moody
> 
> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-M57cbb0b0c0708356df2a8fb8>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-Me903ef68817c22a6fb6435c9
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 6738 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] git/rebase for someone used to git pull --rebase
  2025-02-07 21:03     ` ron minnich
@ 2025-02-07 21:11       ` ron minnich
  2025-02-07 21:46         ` Jacob Moody
  0 siblings, 1 reply; 7+ messages in thread
From: ron minnich @ 2025-02-07 21:11 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 3070 bytes --]

I did try this
git/branch ron_nix
git/rebase remotes/front/front

it ended very badly.


On Fri, Feb 7, 2025 at 1:03 PM ron minnich <rminnich@gmail.com> wrote:

> I think you need to rephrase your commands in terms of 9front git. That's
> my question. I have no question about how to do it with standard git.
>
> re Jacob's example:
> git/rebase remotes/origin/$upstreambranch
>
> I'm still a bit lost on just where the commits end up. upstreambranch?
> Looking at the source to git/rebase, I got a bit confused.
> concrete example:
> git/branch
> heads/ron_nix
> git/pull -f -u 9front
> # ok now what?
> git/rebase heads/ron_nix$remotes/front/front
> ?
>
>
> On Fri, Feb 7, 2025 at 12:05 PM Ben Huntsman <ben@huntsmans.net> wrote:
>
>> In most repos, I just do something like:
>>
>> git checkout master
>> git fetch --all
>> git pull <-- Now I'm up to date with origin, presumably my fork on
>> github, etc
>> git merge upstream/master <-- Now I'm up to date with the project,
>> assuming I added it as upstream
>> git checkout x <-- the local branch I want to rebase
>> git rebase master <-- now it's rebased to the master
>>
>> Wouldn't that work for you here too?
>>
>> -Ben
>>
>>
>> ------------------------------
>> *From:* Jacob Moody <moody@posixcafe.org>
>> *Sent:* Friday, February 7, 2025 9:51 AM
>> *To:* 9fans@9fans.net <9fans@9fans.net>
>> *Subject:* Re: [9fans] git/rebase for someone used to git pull --rebase
>>
>> On 2/7/25 10:23, ron minnich wrote:
>> > what I'm used to
>> > I'm on branch x
>> > git pull --rebase origin main
>> >
>> > with 9front git
>> > I'm on branch x
>> > git/pull -f origin
>> > git/rebase origin/heads/front
>> >
>> > That does not look right. Reading /bin/git/rebase, I almost think I
>> want to do
>> > git/branch heads/front
>> > git/rebase heads/x
>> >
>> > but I'm a bit uncertain. I'm not good with branches at the best of
>> times.
>> 
>> I think what you're looking for is:
>> git/pull -f origin
>> git/rebase remotes/origin/$upstreambranch
>> 
>> git/branch -a will give you all the details about what remote branches
>> we're tracking.
>> 
>> I don't tend to use our git/rebase much, I tend to just use git/log -se
>> branchA..branchB or the inverse to
>> get the commit list and git/export and git/import by hand. Or stash my
>> current branch, reset the one tracking
>> upstream and then go from there.
>> 
>> Thanks,
>> moody
>> 
>> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
>> <https://9fans.topicbox.com/groups/9fans> + participants
>> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
>> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
>> <https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-M57cbb0b0c0708356df2a8fb8>

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-M897a494c3b88d02251d70e11
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 7362 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] git/rebase for someone used to git pull --rebase
  2025-02-07 21:11       ` ron minnich
@ 2025-02-07 21:46         ` Jacob Moody
  2025-02-07 22:23           ` ron minnich
  0 siblings, 1 reply; 7+ messages in thread
From: Jacob Moody @ 2025-02-07 21:46 UTC (permalink / raw)
  To: 9fans

On 2/7/25 15:11, ron minnich wrote:
> I did try this
> git/branch ron_nix
> git/rebase remotes/front/front
> 
> it ended very badly.


Your understanding of remote/* is incorrect, run git/branch -a which will give you all of
the remote/* branches as followed by your repo. When you git/pull -f, those are what get updated,
if you omit the -f then it _also_ updates your "local" branch.

If the remote default branch you're pulling from is named "front" then the remote branch is likely remotes/origin/front.
The convention is remotes/$remotename/$remotebranch.

Again I don't use our rebase, it's a thin wrapper on top of exporting and importing which I tend to do myself I would suggest
to start without it to get an understanding of how this stuff works.

Thanks,
moody


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-M4b4ed018c3d431d6ba979402
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] git/rebase for someone used to git pull --rebase
  2025-02-07 21:46         ` Jacob Moody
@ 2025-02-07 22:23           ` ron minnich
  0 siblings, 0 replies; 7+ messages in thread
From: ron minnich @ 2025-02-07 22:23 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]

yeah, I finally did get it to work. It works more like a merge than the
rebase I'm used to, but it works just fine.

On Fri, Feb 7, 2025 at 1:55 PM Jacob Moody <moody@posixcafe.org> wrote:

> On 2/7/25 15:11, ron minnich wrote:
> > I did try this
> > git/branch ron_nix
> > git/rebase remotes/front/front
> >
> > it ended very badly.
> 
> 
> Your understanding of remote/* is incorrect, run git/branch -a which will
> give you all of
> the remote/* branches as followed by your repo. When you git/pull -f,
> those are what get updated,
> if you omit the -f then it _also_ updates your "local" branch.
> 
> If the remote default branch you're pulling from is named "front" then the
> remote branch is likely remotes/origin/front.
> The convention is remotes/$remotename/$remotebranch.
> 
> Again I don't use our rebase, it's a thin wrapper on top of exporting and
> importing which I tend to do myself I would suggest
> to start without it to get an understanding of how this stuff works.
> 
> Thanks,
> moody
> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9075ee3b04492dd0-Mb0a594eccf9b4c5411d05359
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 2648 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-02-07 22:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-07 16:23 [9fans] git/rebase for someone used to git pull --rebase ron minnich
2025-02-07 17:51 ` Jacob Moody
2025-02-07 19:26   ` Ben Huntsman
2025-02-07 21:03     ` ron minnich
2025-02-07 21:11       ` ron minnich
2025-02-07 21:46         ` Jacob Moody
2025-02-07 22:23           ` ron minnich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).