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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 à(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 = 0 > filemode = true > bare = false > logallrefupdates = true > [remote "freebsd"] > url = https://git.freebsd.org/ports.git > fetch = +refs/heads/*:refs/remotes/freebsd/* > [branch "main"] > remote = freebsd > merge = refs/heads/main > % > > Git - git-switch Documentation <https://git-scm.com/docs/git-switch> > -- Nuno Teixeira FreeBSD Committer (ports) [-- Attachment #2 --] <div dir="ltr"><div>Not sure if I understand but I use `git switch` on ports tree to switch from 'main' to 'quarterly' to avoid having 2 trees.</div><div><br></div><div>e.g.</div><div>When in main and need to 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 switch main`</div><div>`git pull --rebase`</div><div><br></div><div>Hope that helps<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Graham Perrin <<a href="mailto:grahamperrin@freebsd.org">grahamperrin@freebsd.org</a>> escreveu no dia sexta, 2/12/2022 à(s) 08:04:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <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="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 sys/netgraph/bluetooth/hci/ng_hci_cmds.c<br> M sys/netgraph/bluetooth/hci/ng_hci_evnt.c<br> M sys/netgraph/bluetooth/include/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="https://git.freebsd.org/ports" target="_blank">https://git.freebsd.org/ports</a><br> fb6a9af3e898..80afc63eeb99 main -> freebsd/main<br> 749ca3ec2e60..c3552efe398e 2022Q4 -> freebsd/2022Q4<br> Updating fb6a9af3e898..80afc63eeb99<br> ^C<br> % cat /usr/ports/.git/config<br> [core]<br> repositoryformatversion = 0<br> filemode = true<br> bare = false<br> logallrefupdates = true<br> [remote "freebsd"]<br> url = <a href="https://git.freebsd.org/ports.git" target="_blank">https://git.freebsd.org/ports.git</a><br> fetch = +refs/heads/*:refs/remotes/freebsd/*<br> [branch "main"]<br> remote = freebsd<br> merge = refs/heads/main<br> % </font><br> </p> <p><a href="https://git-scm.com/docs/git-switch" target="_blank">Git - git-switch Documentation</a></p> </div> <u></u><u></u> </blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span style="color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committer (ports)</span></div></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UJWWHKqAGFWdQHfXTH=H=c0vF1pf1X%2BZO78iDtiL3E=cg>
