This is the mail archive of the
mailing list for the GCC project.
Re: Help with new GCC git workflow...
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: Peter Bergner <bergner at linux dot ibm dot com>, GCC <gcc at gcc dot gnu dot org>
- Date: Tue, 14 Jan 2020 17:54:20 +0000
- Subject: Re: Help with new GCC git workflow...
- Ironport-sdr: g81Cmsb9wHY30TZsVjdP3/+OIHwlXkZfUbGoQ+yxDUbOHdjC8G7CRTaiYTTGmqLjrGq7x7SX2P Di5Isa+j5iDqPk7QklaPcP39Su5smx8WaE4holBakTtAfwvn+slcJJ/0gu9z3UQqBr0f0LLGF6 LUnvjbujuaxV2yax/0bKVMrmmX3B3dUhWAKOgSU/maiSGMGxfIOfeWCpTqobjVIwwKhCFSm32r xRc0HWG5yt89kc1G3OxY0dsFAmtASL5txtscRLP3+mNQ+dYyxPZRwyuYsFKDMTdVGbhe0xi6Bf DgI=
- Ironport-sdr: QIN0OHwo5hX1o58QXoh7egdIFf+2kMyQ3vGnOdeiUiEWokDL/Yu4hIHFEs5GZ7kINlytEY+O7r tQAtHYoI5Fd59k9VsIuxt739B4+zHnLvekcaAk7PhxBXUnVPjQbJQm25/4D/Z3Oqc8twNwKoUa xAAmQYyF35mKgBeOaGMu6GSG9xbICtj9vsAnyYZH/afE4RFrBcKx0pw62Lhz+/pNjK1mXbCTyC UtdMEGj1Sv2Irtvu6G1BKN8e7NyeMN8kBV62U4T83QKN/BQD/zNM+srjBvJRpa0MPKsKoq8L0W AHU=
- References: <email@example.com> <20200114170551.GA413903@redhat.com>
On Tue, 14 Jan 2020, Jonathan Wakely wrote:
> > ...and this is just for changes going to trunk. How does all this change
> > when I want to push changes to a release or vendor branch?
> It's pretty similar. Create a branch from the release branch, merge it
> back to the release branch.
> Personally, I don't usually use branches for backports, because I only
> have one in flight at a time. So I'll just make the change directly in
> the release branch and push it directly from there. I rarely have
And the git approach for backports is "git cherry-pick" (though you can
always use the approach of just applying a patch to a different branch if
you want). I did some recently with "git cherry-pick -x -n -e" to try out
the process of cherry-picking with git in GCC. -x is useful to mark the
commit as a cherry-pick and -n is useful to allow editing before
committing (for ChangeLogs, in particular); not sure if -e actually does
anything given -n. You'll want to have set up git-merge-changelog in any
clone you're doing such cherry-picking in, to avoid getting conflicts from
the cherry-picking of ChangeLogs (but even without conflicts you may want
to edit the ChangeLog entry before commit, to mark it as a backport). If
you're cherry-picking a commit from the SVN era, you also need to edit the
From-SVN: line out of the commit message (the hooks will reject the push
if you don't, because it would confuse things to have such a line in a
commit that isn't actually one from the repository conversion process).
Joseph S. Myers