<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Maxime Demolin on Medium]]></title>
        <description><![CDATA[Stories by Maxime Demolin on Medium]]></description>
        <link>https://medium.com/@MaximeDemolin?source=rss-7571652aa8c9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*AS9mPY9tXG2ZhN8b.</url>
            <title>Stories by Maxime Demolin on Medium</title>
            <link>https://medium.com/@MaximeDemolin?source=rss-7571652aa8c9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:39:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@MaximeDemolin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Use pre-push hook to mimic gitlab’s behaviour on github]]></title>
            <link>https://medium.com/@MaximeDemolin/use-pre-push-hook-to-mimic-gitlabs-behaviour-on-github-b2747bfc1c32?source=rss-7571652aa8c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2747bfc1c32</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Maxime Demolin]]></dc:creator>
            <pubDate>Sat, 27 Jan 2018 09:20:26 GMT</pubDate>
            <atom:updated>2018-01-27T09:20:26.451Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are using <a href="https://about.gitlab.com/">Gitlab</a>, you should have noticed that when you push to origin, you receive a message like the following:</p><pre>remote: Create merge request for pre-push_hook:<br>remote: <a href="https://gitlab.com/group/project/merge_requests/new?merge_request%5Bsource_branch%5D=branch">https://gitlab.com/group/project/merge_requests/new?merge_request%5Bsource_branch%5D=branch</a><br>remote: To gitlab.com:group/project.git</pre><p>This is incredibly handy because you do not need to open your browser, reach for gitlab, open project, and select your merge request. You can just follow link from your terminal and create your merge request straight away.</p><p>For details about gitlab’s implementation, see this <a href="https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/77">merge request</a>.</p><p>In order to achieve the same thing with github, you can use a <a href="https://github.com/git/git/blob/master/Documentation/githooks.txt#L192">pre-push hook</a>.</p><p>Inside your project directory create the file .git/hooks/pre-push with the following content:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4c8cdbd6c4c2fe338e4b5f36e9fd162f/href">https://medium.com/media/4c8cdbd6c4c2fe338e4b5f36e9fd162f/href</a></iframe><p>Do not forget to make it executable for git:</p><pre>chmod +x .git/hooks/pre-push</pre><p>And you are done! Next time you will git push, you&#39;ll receive on your terminal the same link as if you were pushing to gitlab.</p><p>If your are usually pushing to a branch different of the default one, you can also set it with the following:</p><pre>- echo -e &quot;\thttps://github.com/$repo/compare/$branch?expand=1&quot;<br>+ echo -e &quot;\thttps://github.com/$repo/compare/default_branch..$branch?expand=1&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2747bfc1c32" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>