9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] git: avoiding branch pb after merge
@ 2025-01-20 18:52 tlaronde
  0 siblings, 0 replies; only message in thread
From: tlaronde @ 2025-01-20 18:52 UTC (permalink / raw)
  To: 9fans

The "free" account on github at least doesn't allow, when one has made
a PR that had been merged, to sync the branch: the commits get in the
way.

I found this solution (browsing) and it seems to work:

- Once a PR has been merged (and I have done nothing more on my
branch), I invoke locally (unix like syntax):

git  reset --hard HEAD~1 # of course, could be ~n depending on #commits

then:

git push origin HEAD --force

to update remote. I am then able to sync and to pull on the branch
locally to restart:

git pull

This avoids multiplying branches.

FWIW,
-- 
        Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tace9421b32f94a2d-M3d1a9bfa3990413f25bfdf3b
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-20 19:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-20 18:52 [9fans] git: avoiding branch pb after merge tlaronde

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