Thanks a bunch. Looks like what I was searching for, will try it.

Rainer

Am 28.02.2019 um 11:41 schrieb Mark Thomas:
Hi,

I'm swapping a bit between IDE, gitk and the command line much like I
did with svn.

I'm also still trying to iron out some wrinkles in the process. Mostly I
think that is getting git configured correctly.

I'm just going to use master and 8.5.x below but it should work with
7.0.x as well.

Initial setup

cd ~/repos
git clone g...@github.com:apache/tomcat.git asf-tomcat-9.0.x

git clone g...@github.com:apache/tomcat.git asf-tomcat-8.5.x
cd asf-tomcat-8.5.x
git checkout 8.5.x
# I don't want a tracking branch for master in this clone
# because if I do git push complains that it isn't up to date
git co master
git branch --unset-upstream
git checkout 8.5.x
git branch -D master


#Commit ...
cd ~/repos/asf-tomcat-9.0.x
# edit files
git commit -a -m "Some message"
git push

# ... and backport
cd ~/repos/asf-tomcat-8.5.x
git fetch
git cherry-pick <hash>
git push


I am sure there are many different ways to handle this. If you wanted
all the tracking branches in each clone, I am sure you could configure
git push to just push the relevant branch for that clone.

I can probably do more in the IDE than I am currently doing. I'm still
finding my way a bit and figuring out what process works best for me.

HTH,

Mark


On 28/02/2019 10:04, Rainer Jung wrote:
Hi there,

I am struggling a bit with the new merging workflow from master to the
branches. I did a short read on the workspaces and tried cherry-picking
with and without workspaces. It seems workspaces are not for doing
actual commits that should at the end et pushed to origin. And when
using cherry-pick into a checked out 8.5.x branch I end up with a
detached head state.

Assuming commits that apply cleanly to the branches, what is the
proposed workflow?

Something like:

git checkout master

... apply changes ...

git add <files to commit>
git commit
git push

git checkout 8.5.x
????
git push

git checkout 7.0.x
????
git push

Any initial recommendations? I am talking here about simply short
commits that might not warrant creating a local branch (eg.
b5c4c30b8037b587b8804f1e6e764bbfd4ffb727). But that's probably
independent of the backport workflow.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to