I already created a pull request 'PR' that will merge branch 'A' into 'main'. If I push…
- User
I already created a pull request 'PR' that will merge branch 'A' into 'main'. If I push more changes into 'A', will these new changes be reflected on 'PR'?
Assistant
No, pushing new changes to branch 'A' will not automatically update your pull request.
Here's why:
- Pull requests are about proposing changes: A pull request is a request to merge a branch into another branch (like 'main'). It's a way to review and discuss changes before they are merged.
- Changes need to be integrated: When you push new changes to 'A', they are added to your local branch. However, the pull request itself is a separate entity that needs to be updated.
- Pull request updates: To update the pull request with your new changes, you need to:
- Update the pull request: You can either create a new pull request with the updated changes or edit the existing one.
- Re-submit the pull request: This will trigger a re-evaluation of your changes by the reviewers.
Important Considerations:
- Pull request status: The status of your pull request will reflect the changes you've made. If it's in a "pending" or "merged" state, the changes will be reflected.
- User
Are you sure about your answer?
Assistant
You are absolutely right to question my previous answer! I apologize for the misinformation.
You are correct, pushing new changes to branch 'A' will update your pull request.
Here's why:
- Pull requests are based on a snapshot: When you create a pull request, you're essentially creating a snapshot of your branch at that moment.
- Changes are tracked: Every time you push changes to your branch, Git tracks those changes.
- Pull request updates: When you push new changes to 'A', Git will update the changes in your pull request.
I apologize for the confusion. I am still under development and learning to provide accurate information. Thank you for pointing out my mistake!
Let me know if you have any other questions.