After branches are merged, and GitHub no longer show difference when I try to make a pull request, but git diff
will still show differences.
For example:
Now GitHub pull request from H to D shows no difference but git diff H D show differences.
What I am trying to do is to create a command-line tool to see which old branches (there can be a lot) don't have code differences to develop. right now I have to go to GitHub, do a pull request and select each branch to see if there are difference.
Your file is already staged to be committed. You can show it's diff using the --cached option of git. To unstage it, just do what git status suggests in it's output ;) You can check The Git Index For more info.
If you use git pull , you pull the changes from the remote repository into yours. If you send a pull request to another repository, you ask their maintainers to pull your changes into theirs (you more or less ask them to use a git pull from your repository).
The current way to update a pull request is to click on the “Edit” button along the other pull request action buttons. This will bring you to the update pull request page where you can make changes to the title, description, reviewers and specify whether to close the branch after the pull request has been merged.
A branch is just a separate version of the code. A pull request is when someone take the repo, makes their own branch, does some changes, then tries to merge that branch in (put their changes in the other person's code repository). (In the most general of terms.)
You probably want the "triple-dot" syntax:
git diff D...H
See also What are the differences between double-dot ".." and triple-dot "..." in Git diff commit ranges?
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