Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iterative pull requests from the same branch?

Tags:

git

github

Say I create a branch that is ready to be merged with master, so I create a pull request. Eventually this pull request is accepted.

Say that I continue working on that branch to improve it in some way. Can I do a pull request again later from the same branch? and if I do so:

  1. Would this confuse git, GitHub in any way?
  2. Is this a proper worfkflow?
like image 603
Amelio Vazquez-Reina Avatar asked Oct 20 '22 07:10

Amelio Vazquez-Reina


1 Answers

You can do this fine, and I often do. A branch can have many pull requests over its lifetime, so GitHub won't get confused.

We use PRs for to merge functionality into the develop branch for long-running features as it becomes stable. We could merge back, delete the branch and create a new one, but that feels like a lot of extra work for no benefit :).

We also make heavy use of the Git Flow workflow, which I'd recommend looking into.

like image 172
spikeheap Avatar answered Oct 27 '22 18:10

spikeheap