User2 does the changes and commits them. Then, she provides these changes to
User1 who pushes the changes upstream.
The changes can be provided via various mechanisms:
git format-patch them and send the patches to
User1 via E-Mail
User2 could use
git request-pull in order to format an E-Mail holding details for
User1 where she could find the changes (additional bare repo, direct read access to the machine of
- Domain specific mechanisms (i.e. Github Pull Requests, Gitlab Merge Requests, ...)
Your requirement is not uncommon: lots of open source projects work just like this: while everybody could contribute changes, it's up to certain (trustworthy) people to integrate these changes into the actual project repository.
I'll provide some examples for how to use
git format-patch or
git request-pull here
Create patches for the last 3 commits you did:
git format-patch -3
This will create 3 patch files that you could send via E-Mail to somebody that is allowed to commit on the upstream repo
Create patches for all commits of the branch
my-new-feature since you branched off from master:
git format-patch master..my-new-feature
This will take each commit you did in
my-new-feature and create a patch from it. Again, send these patches to the maintainer.
Publish your changes to the maintainer directly from your hard disk (Windows):
- Share your working directory with the maintainer (give her read access), say as
\\yourmachine\yourworkingcopy. From now on, the maintainer could read the contents of the shared folder
Open up your console and let the magic happen:
git request-pull origin/master file:////yourmachine/yourworkingcopy my-new-feature
This spits out a ready made E-Mail text to the console that you could take and send to your maintainer.