I've added this to my .git/config
file:
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
Which allows me to pull down pull request diffs, but when I check it out it actually creates a branch with that same name. Is there any way for me to push to pr/2
and have it actually go to the pull request instead of going to a new branch named pr/2
?
Once you've created a pull request, you can push commits from your topic branch to add them to your existing pull request. These commits will appear in chronological order within your pull request and the changes will be visible in the "Files changed" tab.
To attach a file to an issue or pull request conversation, drag and drop it into the comment box. Alternatively, you can click the bar at the bottom of the comment box to browse, select, and add a file from your computer. Tip: In many browsers, you can copy-and-paste images directly into the box.
Always Pull Before a Push This is a bedrock rule. Before you try to push code out to the repository, you should always pull all the current changes from the remote repository to your local machine. Doing so will ensure that your local copy is in sync with the remote repository.
A Pull Request is just a request to merge a certain branch. This means commits made to the branch after the pull request is opened will be included in the eventual merge.
If you have access to the branch that the pull request is asking to merge, you can commit to that branch and the pull request will update with the changes.
Example:
pull/3 is requesting to merge hotfix
into master
git fetch git checkout hotfix git pull origin hotfix
make changes
git add . git commit -m "changes!" git push origin hotfix
Now your commit will show up in the pull request.
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