I'm using a behind-firewall install of Gitorious.
I can go into the web application and create a pull request from a clone and target the master repo from which it was cloned.
I'd like to be able to do this on the command line. More specifically, I'd like to be able to open merge requests from the command line from one branch to another (rather than from clone to seed repo).
Since I'm not using Github, I can't use Github specific tools or libraries. Is this possible?
There is no such thing as “merge request” in git itself. So, if this would be possible, it would require Gitorious-specific tools. It's not possible in pure git.
You may use this command line tool: https://github.com/brauliobo/gitorious-merge-request
The answer given by svick is not correct. It is possible.
There's
git request-pull
which is part of the Git suite. Using that command line tool, you could create a pull request that could be sent per E-Mail.Example:
your
origin
holds a branchmaster
. Now you create a local bugfix branchfix
, implement the bug fix and push thatfix
branch toorigin
:Then, you want someone to merge the changes made in the
fix
branch intomaster
. Create the pull request withThis will create a text formatted as follows:
If the merge request shall go to somebody that cannot access your repo where you pushed your changes, there's always the opportunity of doing it with
git format-patch
.After pushing your
fix
branch toorigin
(you don't even need to do that), while being on thefix
branch create the patch usingThis will create a patch file for each commit you did in
fix
since branching offmaster
. You could bundle the generated.patch
files withand then send to someone e.g. via E-Mail to review and apply.
For the sake of completeness: applying the patches could be done with
git am
.