Add the following shell function to your .bashrc
.
mr() {
local url=$(git remote get-url origin)
# on OSes other than Mac OS X replace `open -a "Google Chrome` with your browsers executable, e.g. google-chrome on Ubuntu
open -a "Google Chrome" "${url%.git}/merge_requests/new?merge_request[source_branch]=$(git symbolic-ref -q --short HEAD)"
}
Source your .bashrc
.
$ . .bashrc
After you have pushed a commit, type mr
on the commandline.
$ git commit -a -m 'Update README.md'
$ git push
$ mr
A browser window with the new Merge Request will open in your browser.