Say I have a branch, demos
, which exists to create demo code against whatever is in master
. I want the commits to the demo
branch to ping everyone pretty frequently, generally by being part of a pull request.
That is, I created the branch demos
and the initial commit for the branch, and then made a pull request from it. I'd like to merge it to master
but also leave the pull request open, so that as new commits are pushed, they just become more commits on that same pull request.
It doesn't seem like this is easy to achieve -- once I manually merged from demos
into master
, it automatically "closed" the pull request on github. But now I'd like to add some more changes to the same demos
branch, and commit & push, just simply have it ping everyone who cares about demos
as part of that same pull request.
Since it's not easy to do this, it makes me think it is wrong. Sometimes doing the easy thing is wrong in git
(like using pull
) but the rule is often that if you're going out of your way to do something that git
doesn't naturally do, then you're probably using it wrong.
I want to handle this case in a way that is considered good by the git
community and best practices. But at the same time it seems like a pretty obvious use case: a pull request to alert other to pick up changes from the branch, but not to consider the request 'complete' after the merge. An on-going pull request.
I could generate a new pull request all the time, but then it doesn't keep the different demos
commits logically connected together in terms of how it all displays on github and alerts people. At the commit level, changes to demos
are different from each other and may be very different things even from different authors. But at the pull request level, I'd like it to look like "all the time when anyone has stuff to push through demos
it comes via this one pull request."
What's the deficiency of that workflow, and why is it not an option when merging from a PR in git?
git checkout master; git merge branch/with/pull/request
? – Pottage