Date: Fri, 2 Dec 2022 12:08:56 +0000 From: Nuno Teixeira <eduardo@freebsd.org> To: Graham Perrin <grahamperrin@freebsd.org> Cc: freebsd-git@freebsd.org Subject: Re: git-switch(1) then git-pull(1) Message-ID: <CAFDf7UJWWHKqAGFWdQHfXTH=H=c0vF1pf1X%2BZO78iDtiL3E=cg@mail.gmail.com> In-Reply-To: <ef399d4c-cb26-2bff-9966-684d3a7b96ad@freebsd.org> References: <ef399d4c-cb26-2bff-9966-684d3a7b96ad@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000005b62e405eed73412 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Not sure if I understand but I use `git switch` on ports tree to switch from 'main' to 'quarterly' to avoid having 2 trees. e.g. When in main and need to do a commit on 2022Q4: `git switch 2022Q4` `git pull --rebase` `git cherry-pick -x XXX` `git push` and switch back to main: `git switch -` or `git switch main` `git pull --rebase` Hope that helps Graham Perrin <grahamperrin@freebsd.org> escreveu no dia sexta, 2/12/2022 =C3=A0(s) 08:04: > I'm confused. > > If a switch is intended to update things, then how can an immediately > subsequent pull lead to updates? > > > % git -C /usr/ports switch main && git -C /usr/src switch main > Already on 'main' > Your branch is up to date with 'freebsd/main'. > M sys/netgraph/bluetooth/hci/ng_hci_cmds.c > M sys/netgraph/bluetooth/hci/ng_hci_evnt.c > M sys/netgraph/bluetooth/include/ng_hci.h > Already on 'main' > Your branch is up to date with 'origin/main'. > % git -C /usr/ports pull --ff-only && git -C /usr/src pull --ff-only > remote: Enumerating objects: 3284, done. > remote: Counting objects: 100% (840/840), done. > remote: Compressing objects: 100% (3/3), done. > remote: Total 3284 (delta 837), reused 837 (delta 837), pack-reused 2444 > Receiving objects: 100% (3284/3284), 1.92 MiB | 1.11 MiB/s, done. > Resolving deltas: 100% (1985/1985), completed with 474 local objects. > From https://git.freebsd.org/ports > fb6a9af3e898..80afc63eeb99 main -> freebsd/main > 749ca3ec2e60..c3552efe398e 2022Q4 -> freebsd/2022Q4 > Updating fb6a9af3e898..80afc63eeb99 > ^C > % cat /usr/ports/.git/config > [core] > repositoryformatversion =3D 0 > filemode =3D true > bare =3D false > logallrefupdates =3D true > [remote "freebsd"] > url =3D https://git.freebsd.org/ports.git > fetch =3D +refs/heads/*:refs/remotes/freebsd/* > [branch "main"] > remote =3D freebsd > merge =3D refs/heads/main > % > > Git - git-switch Documentation <https://git-scm.com/docs/git-switch> > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000005b62e405eed73412 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Not sure if I understand but I use `git switch` on po= rts tree to switch from 'main' to 'quarterly' to avoid havi= ng 2 trees.</div><div><br></div><div>e.g.</div><div>When in main and need t= o do a commit on 2022Q4:</div><div>`git switch 2022Q4`</div><div>`git pull = --rebase`</div><div>`git cherry-pick -x XXX`</div><div>`git push`</div><div= ><br></div><div>and switch back to main:</div><div>`git switch -` or `git s= witch main`</div><div>`git pull --rebase`</div><div><br></div><div>Hope tha= t helps<br></div><div><br></div><div><br></div></div><br><div class=3D"gmai= l_quote"><div dir=3D"ltr" class=3D"gmail_attr">Graham Perrin <<a href=3D= "mailto:grahamperrin@freebsd.org">grahamperrin@freebsd.org</a>> escreveu= no dia sexta, 2/12/2022 =C3=A0(s) 08:04:<br></div><blockquote class=3D"gma= il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2= 04,204);padding-left:1ex"> =20 =20 =20 <div> <p>I'm confused. <br> </p> <p>If a switch is intended to update things, then how can an immediately subsequent pull lead to updates?</p> <p><br> </p> <p><font face=3D"monospace">% git -C /usr/ports switch main && git -C /usr/src switch main<br> Already on 'main'<br> Your branch is up to date with 'freebsd/main'.<br> M=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sys/netgraph/bluetooth/hci/ng= _hci_cmds.c<br> M=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sys/netgraph/bluetooth/hci/ng= _hci_evnt.c<br> M=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sys/netgraph/bluetooth/includ= e/ng_hci.h<br> Already on 'main'<br> Your branch is up to date with 'origin/main'.<br> % git -C /usr/ports pull --ff-only && git -C /usr/src pull --ff-only<br> remote: Enumerating objects: 3284, done.<br> remote: Counting objects: 100% (840/840), done.<br> remote: Compressing objects: 100% (3/3), done.<br> remote: Total 3284 (delta 837), reused 837 (delta 837), pack-reused 2444<br> Receiving objects: 100% (3284/3284), 1.92 MiB | 1.11 MiB/s, done.<br> Resolving deltas: 100% (1985/1985), completed with 474 local objects.<br> From <a href=3D"https://git.freebsd.org/ports" target=3D"_blank">ht= tps://git.freebsd.org/ports</a><br> =C2=A0=C2=A0 fb6a9af3e898..80afc63eeb99=C2=A0 main=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 -> freebsd/main<br> =C2=A0=C2=A0 749ca3ec2e60..c3552efe398e=C2=A0 2022Q4=C2=A0=C2=A0=C2= =A0=C2=A0 -> freebsd/2022Q4<br> Updating fb6a9af3e898..80afc63eeb99<br> ^C<br> % cat /usr/ports/.git/config<br> [core]<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 repositoryformatversion = =3D 0<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 filemode =3D true<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bare =3D false<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 logallrefupdates =3D tru= e<br> [remote "freebsd"]<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 url =3D <a href=3D"https= ://git.freebsd.org/ports.git" target=3D"_blank">https://git.freebsd.org/por= ts.git</a><br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fetch =3D +refs/heads/*:= refs/remotes/freebsd/*<br> [branch "main"]<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 remote =3D freebsd<br> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 merge =3D refs/heads/mai= n<br> % </font><br> </p> <p><a href=3D"https://git-scm.com/docs/git-switch" target=3D"_blank">Gi= t - git-switch Documentation</a></p> </div> <u></u><u></u> </blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g= mail_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nun= o Teixeira<br>FreeBSD Committer (ports)</span></div></div> --0000000000005b62e405eed73412--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UJWWHKqAGFWdQHfXTH=H=c0vF1pf1X%2BZO78iDtiL3E=cg>