<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Github on Ulis Notizen</title>
    <link>https://wolf-u.li/tag/github/</link>
    <description>Recent content in Github on Ulis Notizen</description>
    <generator>Hugo</generator>
    <language>de</language>
    <copyright>Copyright 2006-CURRENTYEAR Uli Wolf - All rights reserved</copyright>
    <lastBuildDate>Sat, 18 Jun 2016 12:38:53 +1800</lastBuildDate>
    <atom:link href="https://wolf-u.li/tag/github/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Git: Aktualisierung eines fork aus dem ursprünglichen Repository</title>
      
      
      <link>https://wolf-u.li/git-aktualisierung-eines-fork-aus-dem-urspruenglichen-repository/</link>
      <pubDate>Sat, 18 Jun 2016 12:38:53 +1800</pubDate>
      <guid>https://wolf-u.li/git-aktualisierung-eines-fork-aus-dem-urspruenglichen-repository/</guid>
      <description>&lt;p&gt;Vor kurzem habe ich in &lt;link rel=dns-prefetch href=//github.com /&gt; &lt;a href=&#34;https://github.com/Makuna/Task&#34;
    title=&#34;Makuna/Task&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Makuna/Task&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; eine kleine &lt;link rel=dns-prefetch href=//github.com /&gt; &lt;a href=&#34;https://github.com/Makuna/Task/commit/c99309dfdd1544350c5034b581872c3d2df3572c&#34;
    title=&#34;Änderung&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Änderung&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; gemacht und via &lt;link rel=dns-prefetch href=//github.com /&gt; &lt;a href=&#34;https://github.com/Makuna/Task/pull/10&#34;
    title=&#34;Pull Request&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  Pull Request&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt; geschickt. Soweit hat das alles wunderbar geklappt. Heute hatte ich eine neue Idee und musste aber zunächst meinen Fork wieder auf den aktuellen Stand bringen. Hier ist wie es geht.&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Vor kurzem habe ich in <link rel=dns-prefetch href=//github.com /> <a href="https://github.com/Makuna/Task"
    title="Makuna/Task" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Makuna/Task&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> eine kleine <link rel=dns-prefetch href=//github.com /> <a href="https://github.com/Makuna/Task/commit/c99309dfdd1544350c5034b581872c3d2df3572c"
    title="Änderung" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Änderung&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> gemacht und via <link rel=dns-prefetch href=//github.com /> <a href="https://github.com/Makuna/Task/pull/10"
    title="Pull Request" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Pull Request&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a> geschickt. Soweit hat das alles wunderbar geklappt. Heute hatte ich eine neue Idee und musste aber zunächst meinen Fork wieder auf den aktuellen Stand bringen. Hier ist wie es geht.</p>
<p>Öffne das lokale Verzeichnis mit der Git Shell. Stelle zunächst den Namen des upstream Repositories fest:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git remote -v
</span></span></code></pre></td></tr></table>
</div>
</div><p>Das sieht dann so aus:
<img src="/upload/2016/06/5662-aktualisierung-git-fork-1.webp" alt="5662-aktualisierung-git-fork-1" loading="lazy">
Wie man sieht heisst das Ursprungsrepository hier &ldquo;Makuna&rdquo;, also:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git fetch Makuna
</span></span></code></pre></td></tr></table>
</div>
</div><p><img src="/upload/2016/06/5662-aktualisierung-git-fork-2.webp" alt="5662-aktualisierung-git-fork-2" loading="lazy">
Sicherstellen, dass man aktuell alles da hat:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git checkout master
</span></span></code></pre></td></tr></table>
</div>
</div><p><img src="/upload/2016/06/5662-aktualisierung-git-fork-3.webp" alt="5662-aktualisierung-git-fork-3" loading="lazy"></p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git merge Makuna/master
</span></span></code></pre></td></tr></table>
</div>
</div><p><img src="/upload/2016/06/5662-aktualisierung-git-fork-4.webp" alt="5662-aktualisierung-git-fork-4" loading="lazy"></p>
<p>Bei Bedarf wieder auf Github hochschieben:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git push
</span></span></code></pre></td></tr></table>
</div>
</div><p><img src="/upload/2016/06/5662-aktualisierung-git-fork-5.webp" alt="5662-aktualisierung-git-fork-5" loading="lazy"></p>
<p>Easy oder? ;)</p>
]]></content:encoded>
    </item>
    <item>
      <title>Git: Update eines Fork aus dem Upsteam (z.b. auf Github)</title>
      
      
      <link>https://wolf-u.li/git-update-eines-fork-aus-dem-upsteam-z-b-auf-github/</link>
      <pubDate>Sat, 24 Nov 2012 17:50:05 +2400</pubDate>
      <guid>https://wolf-u.li/git-update-eines-fork-aus-dem-upsteam-z-b-auf-github/</guid>
      <description>&lt;p&gt;Seit einiger Zeit beschäftige ich mich mit git, einem verteilten Versionskontrollsystem und bin auf Github aktiv. Ein Problem was sich immer wieder findet, ist dass man ein Repository geforked hat und sich derweil das originale Repository weiterentwickelt. Nun möchte man den einen Fork aktualisieren&amp;hellip; und schon steht man vor dem Berg. Ich zeige hier an dem Projekt &lt;link rel=dns-prefetch href=//github.com /&gt; &lt;a href=&#34;https://github.com/sequelize/sequelize-doc&#34;
    title=&#34;sequelize-doc&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  sequelize-doc&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;, der Dokumentation des ORM &lt;link rel=dns-prefetch href=//www.sequelizejs.com /&gt; &lt;a href=&#34;http://www.sequelizejs.com/&#34;
    title=&#34;sequelize&#34; 
     target=&#34;_blank&#34; rel=&#34;nofollow noopener noreferrer&#34; &gt;
  sequelize&amp;nbsp;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; class=&#34;icon&#34; aria-hidden=&#34;true&#34; focusable=&#34;false&#34; viewBox=&#34;0 -128 512 640&#34;&gt;
    &lt;path d=&#34;M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z&#34;/&gt;
  &lt;/svg&gt;&lt;/a&gt;, wie das funktioniert. In meinem Falle habe ich drei Repositories:&lt;/p&gt;</description>
      
         <content:encoded><![CDATA[<p>Seit einiger Zeit beschäftige ich mich mit git, einem verteilten Versionskontrollsystem und bin auf Github aktiv. Ein Problem was sich immer wieder findet, ist dass man ein Repository geforked hat und sich derweil das originale Repository weiterentwickelt. Nun möchte man den einen Fork aktualisieren&hellip; und schon steht man vor dem Berg. Ich zeige hier an dem Projekt <link rel=dns-prefetch href=//github.com /> <a href="https://github.com/sequelize/sequelize-doc"
    title="sequelize-doc" 
     target="_blank" rel="nofollow noopener noreferrer" >
  sequelize-doc&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, der Dokumentation des ORM <link rel=dns-prefetch href=//www.sequelizejs.com /> <a href="http://www.sequelizejs.com/"
    title="sequelize" 
     target="_blank" rel="nofollow noopener noreferrer" >
  sequelize&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a>, wie das funktioniert. In meinem Falle habe ich drei Repositories:</p>
<ul>
<li><em>Lokal</em></li>
<li><em>Origin</em>: Mein Fork auf Github</li>
<li><em>Upstream</em>: <link rel=dns-prefetch href=//github.com /> <a href="https://github.com/sequelize/sequelize-doc"
    title="Das originale Repository" 
     target="_blank" rel="nofollow noopener noreferrer" >
  Das originale Repository&nbsp;<svg xmlns="http://www.w3.org/2000/svg" class="icon" aria-hidden="true" focusable="false" viewBox="0 -128 512 640">
    <path d="M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"/>
  </svg></a></li>
</ul>
<p>Wenn man forkt, arbeitet man lokal immer mit dem eigenen Fork von Github (<em>Origin</em>), daher ist man lokal auch nur mit diesem Verbunden.Nun muss man lokal ein neues remote-Repository namens &ldquo;upstream&rdquo; hinzufügen, damit das originale eingebunden wird:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git remote add upstream git://github.com/sdepold/sequelize-doc.git
</span></span></code></pre></td></tr></table>
</div>
</div><p>Dann pullt man die Änderungen ins lokale Verzeichnis (hier in den <em>Master</em>-branch):</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git pull upstream master
</span></span></code></pre></td></tr></table>
</div>
</div><p>Jetzt ist der lokale Master-Branch &ldquo;in sync&rdquo; mit dem <em>Upstream</em>. Das Ergebnis pusht man nun wieder in <em>Origin</em>:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git push origin master
</span></span></code></pre></td></tr></table>
</div>
</div><p>In Zukunft muss man natürlich nur noch die beiden letzten Schritte machen, die Verknüpfung mit <em>Upstream</em> bleibt im lokalen Repository gespeichert.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
