I made a pull request, but now I need to push an additional commit to this pull request. Github says that:
You can add more commits to this pull request by pushing to the x4e925e4 branch on myaccount/repo.
How do I achieve this via the command line?
To make changes to an existing pull request, make the changes to your local branch, add a new commit with those changes, and push those to your fork. GitHub will automatically update the pull request.
Yes, it will. This includes merge commits, by the way, so if a different branch than the target branch of the pull request is merged in to the branch, then the merge commit and both of its parent chains of commits (from both branches) will become part of the PR.
You can commit changes on a pull request branch that was created from a fork of your repository with permission from the pull request creator. You can only make commits on pull request branches that: are opened in a repository that you have push access to and that were created from a fork of that repository.
Push Branch to Another Branch In some cases, you may want to push your changes to another branch on the remote repository. In order to push your branch to another remote branch, use the “git push” command and specify the remote name, the name of your local branch as the name of the remote branch.
git push origin master:x4e925e4
If you want to push from another branch, just change the "master" bit.
Once the pull request is done, if this branch is not automatically deleted, you can delete it with:
git push origin :x4e925e4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With