Re: Tracking parent branches in Git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 01 Jul 2019 12:48:16 +0000, Bryan Turner wrote:
...
> In other words, when I locally do:
> git checkout --no-track -b bturner-some-bugfix origin/release/5.16
> 
> release/5.16 is the "parent branch" of my bugfix branch and, when I
> push my branch and try to open a pull request, release/5.16 is a
> _likely_ target for where I'd want to merge it.

We have simply conventionalized this - the parent relation is in
the branch names. Your bugfix branch would be release/5.16/bturner-some-bugfix
(in the central repo; we don't care how you name it locally), and, because
ref storage, the parent would be release/5.16/master.

You'd just do

  git create-br release/5.16/bturner-some-bugfix

and it would be branched off the corresponding /master, be checked
out, and tracking already been set up. Likewise we have a

  git update

which looks at the upstream name, deduces the parent, and pulls
that in, with a suitable commit message. Finally,

  git mkpullreq

creates a pull request from the current to the parent branch.

(I would like to have a way to make bitbucket server use the same
convention for the default pull request target.)

- Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux