'Create code review before commit to GitHub
I want to upload my .diff file (from git diff) which contains what I changed for my team-mate can review it before I commit to GitHub.
How could I upload my diff file and create a review page for my colaborators?
I already google but not clear so much. Please help, thanks you!
Solution 1:[1]
You could put the diff in a Github Gist, but that would be defeating the point of Github.
Instead, you'd use a Pull Request. You'd make the changes in a branch, possibly in your own fork of the project, and submit it to the project as a Pull Request. This contains all your commits on that branch with full context. Pull Requests have their own review system, so others can comment. Once it passed review, the changes can be merged.
Solution 2:[2]
use this command:
git merge --no-commit --no-ff branchname
Solution 3:[3]
you can use ReviewBoard or any other pre commit review tool.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Schwern |
| Solution 2 | Payam Khaninejad |
| Solution 3 | user2494395 |
