Normally in Git, each developer will clone from the origin into a personal tracking repo, make some changes, then send a fetch request to the manager referencing his personal machine which has a git-daemon, or web server, or allows the manager to connect to it with ssh.
For some changes its alright for the dev to check in stuff himself. For larger ones, other people like to look at it before it gets checked into master. So the dev does have the privilege to check into the repository.
But what if the manager couldn't connect to other devs work machines, and only had access to the origin git repo, or email? What is the best way to send the diffs to him for review?
We could send patches in an email or the dev could push his branch out to origin and tell the manager to git fetch origin; git diff master..case223
. Or is there another better way?
I would use
git format-patch <branch-to-compare-against> --cover-letter -o patches/
which will essentially create the appropriate patches for your commits and then
git send-email --to <[email protected]> --annotate patches/*
Check the man pages:
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