I've submitted a change to an Open Source project on Github, and received code review comments from one of the core team members.
I would like to update the code taking into account the review comments, and re-submit it. What is the best workflow for doing this? From my limited knowledge of git/github, I could do any of the following:
-
Update the code as a new commit, and add both the initial and updated commit to my pull request.
-
Somehow (??) rollback the old commit from my repository, and create a single new commit containing everything, then raise a pull request for that?
-
git commit
has an amend feature, but I've heard that you shouldn't use it after you've pushed the commit outside of your local repository? In this case I have made the change on my local PC and pushed to my github branch of the project. Would this be OK to use 'amend'? -
Something else?
It seems like option 2/3 would be nice, as the open source project would only have one commit in their history which would implement everything, but I'm not sure how to do this.