<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Git on Janik von Rotz</title>
    <link>https://janikvonrotz.ch/tags/git/</link>
    <description>Recent content in Git on Janik von Rotz</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Thu, 09 Apr 2026 07:30:58 +0200</lastBuildDate>
    <atom:link href="https://janikvonrotz.ch/tags/git/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Git and Jujutsu</title>
      <link>https://janikvonrotz.ch/2026/04/09/git-and-jujutsu/</link>
      <pubDate>Thu, 09 Apr 2026 07:30:58 +0200</pubDate>
      <guid>https://janikvonrotz.ch/2026/04/09/git-and-jujutsu/</guid>
      <description>&lt;p&gt;To know how to git is to know pain. I wouldn&amp;rsquo;t describe myself as a master of git. Never done the bisect and rebase onto stuff. Because git is my daily driver on the command line I am always interested to learn how to use it better.&lt;/p&gt;&#xA;&lt;p&gt;One thing that seems to be a good fit for git is jujutsu. It showed up in my feed once again.&lt;/p&gt;&#xA;&lt;p&gt;In software engineering git has become single most important tool. But as mentioned some parts of git are and will always be a hassle. One such thing is rewriting the history and it seems jujutsu solves exactly that.&lt;/p&gt;&#xA;&lt;p&gt;Lets head over to &lt;a href=&#34;https://docs.jj-vcs.dev/latest/install-and-setup/&#34;&gt;https://docs.jj-vcs.dev/latest/install-and-setup/&lt;/a&gt; and install jujutsu. In my case installing a new tool means extending the &lt;a href=&#34;https://codeberg.org/janikvonrotz/dotfiles&#34;&gt;https://codeberg.org/janikvonrotz/dotfiles&lt;/a&gt; repo.&lt;/p&gt;&#xA;&lt;p&gt;The jujutsu cli can be invoked with &lt;code&gt;jj&lt;/code&gt;. Lets do our first commit in the &lt;code&gt;Odoo-Build&lt;/code&gt; repo.&lt;/p&gt;&#xA;&lt;p&gt;When I checked the status of the repo I got this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;main&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/Odoo-Build&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Error: There is no jj repo in &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hint: It looks like this is a git repo. You can create a jj repo backed by it by running this:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;jj git init&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ok, so jj does not work directly with a git repo.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;main&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/Odoo-Build&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj git init&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Done importing changes from the underlying Git repo.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Setting the revset alias &lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;trunk&lt;span style=&#34;color:#f92672&#34;&gt;()&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt; to &lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;main@origin&lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hint: The following remote bookmarks aren&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#39;&lt;/span&gt;t associated with the existing local bookmarks:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  chore-task-script-style-guide@origin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  main@origin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hint: Run the following command to keep local bookmarks updated on future pulls:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  jj bookmark track chore-task-script-style-guide --remote&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;origin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  jj bookmark track main --remote&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;origin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Initialized repo in &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hint: Running &lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;git clean -xdf&lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt; will remove &lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;.jj/&lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;!&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Not sure what bookmarks are, but they seem important. Let&amp;rsquo;s check status again.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;main&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/Odoo-Build&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj status&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Working copy changes:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;M bin/upgrade-odoo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Working copy  &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;@&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; : yxssyntv 7e4c4ccf &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;no description set&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Parent commit &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;@-&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;: kwlvwrwt 8d967000 main main@origin | fix&lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;upgrade-odoo&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;: correct typo in drop-database condition&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And now the commit!&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;main&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/Odoo-Build&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj commit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Working copy  &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;@&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; now at: xtkvuony 270d625b &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;empty&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;no description set&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Parent commit &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;@-&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;      : yxssyntv 3a37f97a feat&lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;odoo-upgrade&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;: improve script&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Warning: Name and email not configured. Until configured, your commits will be created with the empty identity, and can&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#39;&lt;/span&gt;t be pushed to remotes.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hint: To configure, run:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  jj config set --user user.name &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Some One&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  jj config set --user user.email &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;someone@example.com&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Mhm, so jujutsu is not aware of the git config. Switching into the &lt;code&gt;dotfiles&lt;/code&gt; project.&lt;/p&gt;&#xA;&lt;p&gt;Defined a &lt;code&gt;config.toml&lt;/code&gt; and symlinked it.&lt;/p&gt;&#xA;&lt;p&gt;Then I looked up the flow to commit to main:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;jj log&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;jj commit -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;msg&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;jj bookmark set --revision @- main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;jj git push -r @-&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;jj op log&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I assume this is done once. Lets try it.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;main&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/dotfiles&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj st&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Working copy changes:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;A jujutsu/config.toml&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Working copy  &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;@&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; : qwsmynwm 5dbd8abe &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;no description set&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Parent commit &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;@-&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;: psztsywm 2f76627e main main@origin | feat&lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;prompts&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;: create symlink to jujutsu config after installation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;main&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/dotfiles&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj commit -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;feat(jujutsu): add config&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Working copy  &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;@&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; now at: xmpwvrys 48e0daa3 &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;empty&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;no description set&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Parent commit &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;@-&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;      : qwsmynwm 698ba34e feat&lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;jujutsu&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;: add config&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;698ba34&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/dotfiles&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj bookmark set --revision @- main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Moved &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; bookmarks to qwsmynwm 698ba34e main* | feat&lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;jujutsu&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;: add config&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;698ba34&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/dotfiles&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj git push -r @-&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Warning: Non-tracking remote bookmark main@origin exists&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hint: Run &lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;jj bookmark track main --remote&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;origin&lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt; to import the remote bookmark.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Nothing changed.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Something has been committed. But remote tracking did not work.&lt;/p&gt;&#xA;&lt;p&gt;Trying to push through&amp;hellip;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;698ba34&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/dotfiles&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj git push&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Warning: Non-tracking remote bookmark main@origin exists&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hint: Run &lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;jj bookmark track main --remote&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;origin&lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt; to import the remote bookmark.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Nothing changed.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;698ba34&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/dotfiles&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj bookmark track main --remote&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;origin&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Started tracking &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; remote bookmarks.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;698ba34&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/dotfiles&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$ jj git push&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Changes to push to origin:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Move forward bookmark main from 2f76627e4984 to 698ba34edd9c&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git: Enumerating objects: 5, &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git: Counting objects: 100% &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;5/5&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git: Delta compression using up to &lt;span style=&#34;color:#ae81ff&#34;&gt;16&lt;/span&gt; threads&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git: Compressing objects: 100% &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;3/3&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git: Writing objects: 100% &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;4/4&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;438&lt;/span&gt; bytes | 438.00 KiB/s, &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git: Total &lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;delta 1&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;, reused &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;delta 0&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;, pack-reused &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;from 0&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;698ba34&lt;span style=&#34;color:#f92672&#34;&gt;][&lt;/span&gt;~/dotfiles&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;$&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It worked! Obviously, I lack the understanding of what went on. I have to understand what bookmarks are and how the interaction with git remotes works.&lt;/p&gt;&#xA;&lt;p&gt;There is a guide on how to interact with GitHub: &lt;a href=&#34;https://docs.jj-vcs.dev/latest/github/&#34;&gt;https://docs.jj-vcs.dev/latest/github/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;And here is an explainer on bookmarks: &lt;a href=&#34;https://docs.jj-vcs.dev/latest/bookmarks/&#34;&gt;https://docs.jj-vcs.dev/latest/bookmarks/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Also I think it is worth trying jujutsu without git. In that regards gerrit seem very interesting: &lt;a href=&#34;https://gerrithub.io/Documentation/intro-how-gerrit-works.html&#34;&gt;https://gerrithub.io/Documentation/intro-how-gerrit-works.html&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git Cheat Sheet</title>
      <link>https://janikvonrotz.ch/2021/11/25/git-cheat-sheet/</link>
      <pubDate>Thu, 25 Nov 2021 11:58:06 +0100</pubDate>
      <guid>https://janikvonrotz.ch/2021/11/25/git-cheat-sheet/</guid>
      <description>&lt;p&gt;A simple git cheat sheet.&lt;/p&gt;&#xA;&lt;h2 id=&#34;commit&#34;&gt;Commit&lt;/h2&gt;&#xA;&lt;p&gt;Change last commit message.&lt;br&gt;&#xA;&lt;code&gt;git commit --amend&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;remote&#34;&gt;Remote&lt;/h2&gt;&#xA;&lt;p&gt;List remotes.&lt;br&gt;&#xA;&lt;code&gt;git remote -v&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;List remote branches.&lt;br&gt;&#xA;&lt;code&gt;git branch -r&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Add multiple push urls.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git remote set-url origin --push --add &amp;lt;a remote&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git remote set-url origin --push --add &amp;lt;another remote&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add upstream.&lt;br&gt;&#xA;&lt;code&gt;git remote add upstream ssh@example.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Update fork.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git fetch upstream&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git merge upstream/main&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Resolve history mismatch.\&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git fetch --all&#xA;git reset --hard origin/master&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;tags&#34;&gt;Tags&lt;/h2&gt;&#xA;&lt;p&gt;List tags.&lt;br&gt;&#xA;&lt;code&gt;git tag&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Add tag.&lt;br&gt;&#xA;&lt;code&gt;git tag $TAG_NAME&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Delete tag.&lt;br&gt;&#xA;&lt;code&gt;git tag -d $TAG_NAME&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Push tags.&lt;br&gt;&#xA;&lt;code&gt;git push --tags&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Checkout tag.&lt;br&gt;&#xA;&lt;code&gt;git checkout tags/$TAG_NAME&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;branching&#34;&gt;Branching&lt;/h2&gt;&#xA;&lt;p&gt;Move commit to another branch.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout -b $BRANCH&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git switch master&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git reset --hard HEAD~1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git push -f&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Fetch branch without checking out.&lt;br&gt;&#xA;&lt;code&gt;git fetch origin master&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Prune local remote branches .&lt;br&gt;&#xA;&lt;code&gt;git remote prune origin&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Pull all remote branches.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git branch -r | grep -v &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;\-&amp;gt;&amp;#39;&lt;/span&gt; | &lt;span style=&#34;color:#66d9ef&#34;&gt;while&lt;/span&gt; read remote; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt; git branch --track &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;remote#origin/&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$remote&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git fetch --all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git pull --all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Delete local branches except master.&lt;br&gt;&#xA;`git branch | grep -v &amp;ldquo;master&amp;rdquo; | xargs git branch -D&lt;/p&gt;&#xA;&lt;p&gt;Delete local branches that do not exist on remote.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git fetch -p &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git branch --merged | grep -v &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;\*&amp;#39;&lt;/span&gt; | xargs -n &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; git branch -d&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;staging&#34;&gt;Staging&lt;/h2&gt;&#xA;&lt;p&gt;Save unstaged changes.\&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git stash&#xA;git stash apply&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Stash a specific file.&lt;br&gt;&#xA;&lt;code&gt;git stash file path/to/file&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Remove untracked local files and directories.&lt;br&gt;&#xA;&lt;code&gt;git clean -df&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Stash with name.&lt;br&gt;&#xA;&lt;code&gt;git stash save &amp;quot;$DESCRIPTION&amp;quot;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;log&#34;&gt;Log&lt;/h2&gt;&#xA;&lt;p&gt;Search the git log.&lt;br&gt;&#xA;&lt;code&gt;git log --all --grep=&#39;Build 0051&#39;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;submodule&#34;&gt;Submodule&lt;/h2&gt;&#xA;&lt;p&gt;Create local config.&lt;br&gt;&#xA;&lt;code&gt;git submodule init&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Clone submodules.&lt;br&gt;&#xA;&lt;code&gt;git submodule update&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Initialize and pull git submodules recursively.&lt;br&gt;&#xA;&lt;code&gt;git submodule update --init --recursive&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Show remote of submodules.&lt;br&gt;&#xA;&lt;code&gt;git config --file=.gitmodules -e&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Remove a submodule.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Remove submodule from .git/config&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git submodule deinit -f path_to_submodule&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Remove submodule from .gitmodule and remove directory &lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git rm --cached path_to_submodule&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Remove submodule form .git/modules directory&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm -rf .git/modules/path_to_submodule&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Remove submodule&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm -rf path_to_submodule&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Get current branch of submodules.&lt;br&gt;&#xA;&lt;code&gt;git submodule foreach &#39;git status&#39; | grep &#39;On branch&#39; -b1&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Remove all submdoules.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Deinit all submodules from .gitmodules&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git submodule deinit .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Remove all submodules (`git rm`) from .gitmodules&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git submodule | cut -c43- | &lt;span style=&#34;color:#66d9ef&#34;&gt;while&lt;/span&gt; read -r line; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;git rm &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$line&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Delete all submodule sections from .git/config (`git config --local --remove-section`) by fetching those from .git/config&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git config --local -l | grep submodule | sed -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;s/^\(submodule\.[^.]*\)\(.*\)/\1/g&amp;#39;&lt;/span&gt; | &lt;span style=&#34;color:#66d9ef&#34;&gt;while&lt;/span&gt; read -r line; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;git config --local --remove-section &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$line&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Manually remove leftovers&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm .gitmodules&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm -rf .git/modules&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;diff&#34;&gt;Diff&lt;/h2&gt;&#xA;&lt;p&gt;Setup merge tool.&lt;br&gt;&#xA;&lt;code&gt;git config merge.tool vimdiff&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Show changed files only.&lt;br&gt;&#xA;&lt;code&gt;git diff --name-only HEAD HEAD~1&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Show changes for one file only.&lt;br&gt;&#xA;&lt;code&gt;git diff HEAD HEAD~1 path/to/file&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Show diff for commit and its ancestor .&lt;br&gt;&#xA;&lt;code&gt;git diff 0690a1046771702ec50c3ccf9e834d33debeb2f0^ 0690a1046771702ec50c3ccf9e834d33debeb2f0&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;config&#34;&gt;Config&lt;/h2&gt;&#xA;&lt;p&gt;Set default editor.&lt;br&gt;&#xA;&lt;code&gt;git config --global core.editor &amp;quot;vim&amp;quot;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;pull-requests&#34;&gt;Pull Requests&lt;/h2&gt;&#xA;&lt;p&gt;You can checkout a single pull request reference by doing.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Replace $PR with the pull request number.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git fetch origin pull/$PR/head&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout FETCH_HEAD&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to fetch them all.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git fetch origin +refs/pull/*/merge:refs/remotes/origin/pr/*&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For which you can then checkout the pull request by doing.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git checkout origin/pr/$PR&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to automatically fetch pull requests you can add it to your repo&amp;rsquo;s config.\&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git config --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/origin/pr/*/merge&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git fetch&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;rebase&#34;&gt;Rebase&lt;/h2&gt;&#xA;&lt;p&gt;Squal the last three commits.\&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git rebase -i HEAD~3&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then use keywords &lt;code&gt;pick&lt;/code&gt; to select final commit and &lt;code&gt;squash&lt;/code&gt; for the once to be merged.&lt;/p&gt;&#xA;&lt;p&gt;Remove zip files from git history.\&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;git filter-branch --tree-filter &amp;#39;rm -f path/to/folder/*.zip&amp;#39; HEAD&#xA;git push origin --force --all&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Understand Git</title>
      <link>https://janikvonrotz.ch/2021/11/18/understand-git/</link>
      <pubDate>Thu, 18 Nov 2021 08:29:50 +0100</pubDate>
      <guid>https://janikvonrotz.ch/2021/11/18/understand-git/</guid>
      <description>&lt;p&gt;Everybody who works with a computer must understand the basics of &lt;a href=&#34;https://git-scm.com/&#34;&gt;git&lt;/a&gt; and how to collaborate with git.&lt;/p&gt;&#xA;&lt;p&gt;Git has become the de facto standard for software version control (SVC). Almost any code or documentation is stored in a git repository. It is so important that I believe everybody, who is working a computer, must understand the concept of SVC / git.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Obsidian and Vuepress: include markdown files</title>
      <link>https://janikvonrotz.ch/2021/10/29/obsidian-and-vuepress-include-markdown-files/</link>
      <pubDate>Fri, 29 Oct 2021 19:21:40 +0200</pubDate>
      <guid>https://janikvonrotz.ch/2021/10/29/obsidian-and-vuepress-include-markdown-files/</guid>
      <description>&lt;p&gt;I am using &lt;a href=&#34;https://obsidian.md/&#34;&gt;Obisidan&lt;/a&gt; to manage markdown files and &lt;a href=&#34;https://vuepress.vuejs.org/&#34;&gt;Vuepress&lt;/a&gt; to publish them. With the help of a script &lt;code&gt;build.js&lt;/code&gt; the Obsidian vault is converted into a publishable format for Vuepress. Obsidian supports embeding markdown files using the &lt;code&gt;![](file.md)&lt;/code&gt; syntax. Here I&amp;rsquo;ll show you how this feature can be enabled for Vuepress.&lt;/p&gt;&#xA;&lt;p&gt;First we need to support including markdown files for Vuepress. Install the &lt;a href=&#34;https://github.com/markdown-it/markdown-it&#34;&gt;markdown-it&lt;/a&gt; extension.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;npm install --save markdown-it-include&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And enable it (Vuepress v1).&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;.vuepress/config.js&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;module&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;exports&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#75715e&#34;&gt;// ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;extendMarkdown&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt; (&lt;span style=&#34;color:#a6e22e&#34;&gt;md&lt;/span&gt;) =&amp;gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;md&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;use&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;require&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;markdown-it-include&amp;#39;&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Before the Vuepress build is created the &lt;code&gt;build.js&lt;/code&gt; file is executed.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;convert&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;content&lt;/span&gt;,&lt;span style=&#34;color:#a6e22e&#34;&gt;file&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;// ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;// convert include markdown links&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;// ![title](file.md) -&amp;gt; !!!include(file.md)!!!&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;mdInclude&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;/(!\[.*?\]\(.*?\.md\))/g&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;matches&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;content&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;match&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;mdInclude&lt;/span&gt;) &lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt; []&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; (&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;; &lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;matches&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;length&lt;/span&gt;; &lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;++&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;match&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;matches&lt;/span&gt;[&lt;span style=&#34;color:#a6e22e&#34;&gt;i&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;let&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;include&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;match&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;match&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;/!\[.*\]\((.*\.md)\)/&lt;/span&gt;)[&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;include&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;sanitizeName&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;include&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;content&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;content&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;replace&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;match&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;`!!!include(&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;include&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;)!!!`&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#75715e&#34;&gt;//...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;content&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is just an excerpt. The script does a lot more. It renames files, moves assets, builds indexes and overall tweaks the markdown files to work with Vuepress.&lt;/p&gt;&#xA;&lt;p&gt;Have look &lt;a href=&#34;https://github.com/Mint-System/Wiki/blob/master/build.js&#34;&gt;here&lt;/a&gt; for a full example.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sync Obsidian mobile app with Working Copy git repo</title>
      <link>https://janikvonrotz.ch/2021/08/31/sync-obsidian-mobile-app-with-working-copy-git-repo/</link>
      <pubDate>Tue, 31 Aug 2021 09:55:35 +0200</pubDate>
      <guid>https://janikvonrotz.ch/2021/08/31/sync-obsidian-mobile-app-with-working-copy-git-repo/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m using the &lt;a href=&#34;https://obsidian.md/&#34;&gt;Obsidian&lt;/a&gt; note taking app for almost anything. Having everything stored in plain text Markdown files makes it easy to sync the Obsidian vault with any file sync provider. However, getting the Obsidian vault on the mobile phone without their syncing service is not so easy. In this guide I will explain how you can sync the Obsidian vault to your phone using git and &lt;a href=&#34;https://workingcopyapp.com/&#34;&gt;Working Copy&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This guide assumes that you have the following setup:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Obisidan vault commited with git&lt;/li&gt;&#xA;&lt;li&gt;Remote repository on GitHub, GitLab or somewhere else&lt;/li&gt;&#xA;&lt;li&gt;iPhone and Working Copy app with access to remote repository&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Lets start&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Open the Obsidian mobile app and create a new vault with the same name as your desktop vault&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://janikvonrotz.ch/images/sync-obsidian-with-git-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to settings, open the advanced options and set for &lt;em&gt;Override config folder&lt;/em&gt; the value &lt;code&gt;.obsidian-mobile&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://janikvonrotz.ch/images/sync-obsidian-with-git-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Open Working Copy on your phone, open the repo and click on the top right icon.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://janikvonrotz.ch/images/sync-obsidian-with-git-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Select &lt;em&gt;Setup Folder Sync&lt;/em&gt; and choose the Obsidian vault folder.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://janikvonrotz.ch/images/sync-obsidian-with-git-4.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Now Working Copy will sync the repo with the Obsidian vault folder.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://janikvonrotz.ch/images/sync-obsidian-with-git-5.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reopen the Obsidian vault on your phone and check if the app indexes the new files.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://janikvonrotz.ch/images/sync-obsidian-with-git-6.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Now you can update files with the Obsidian mobile app and commit the changes with Working Copy.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://janikvonrotz.ch/images/sync-obsidian-with-git-7.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Obsidian mobile and destkop app will store their config separately.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git pull overwrite local changes</title>
      <link>https://janikvonrotz.ch/2021/01/07/git-pull-overwrite-local-changes/</link>
      <pubDate>Thu, 07 Jan 2021 10:23:38 +0100</pubDate>
      <guid>https://janikvonrotz.ch/2021/01/07/git-pull-overwrite-local-changes/</guid>
      <description>&lt;p&gt;A new year a new post. Instead of a new years resolution I&amp;rsquo;ve got a git wisdom for you. If you ever have to reset your repository/life use this command:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git fetch --all&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git reset --hard origin/master&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git pull origin master&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It will fetch the latest changes, reset the local repo and then pull the master branch.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Undo a pushed git merge</title>
      <link>https://janikvonrotz.ch/2018/09/11/undo-a-pushed-git-merge/</link>
      <pubDate>Tue, 11 Sep 2018 18:37:25 +0200</pubDate>
      <guid>https://janikvonrotz.ch/2018/09/11/undo-a-pushed-git-merge/</guid>
      <description>&lt;p&gt;First of all the solution to the problem I am tackling should not exist in the first place. If you have to revert a merge on a git branch, think about alternatives. If not other option is left, I&amp;rsquo;ll show you how you can undo a merge with &lt;code&gt;git revert&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;First checkout your branch that has been targeted by the merge.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;git checkout master&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Have a look into the git log and look for the hash of the merge commit.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;git log&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now undo the merge using the revert command.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;git revert -m 1 COMMIT_HASH&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;As mentioned undoing is a dangerous process. Depending on how far the merge commit is from the head of your branch you end up with a lot of conflicts.&lt;/p&gt;&#xA;&lt;p&gt;Check the git repo for conflicts.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;git status&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once you have resolved the issues you can commit the revert commit.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;git commit&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Congrats! You did something were bad 😠&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git branch typing completion and other useful stuff</title>
      <link>https://janikvonrotz.ch/2018/06/22/git-branch-typing-completion-and-other-useful-stuff/</link>
      <pubDate>Fri, 22 Jun 2018 09:11:28 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2018/06/22/git-branch-typing-completion-and-other-useful-stuff/</guid>
      <description>&lt;p&gt;Recently I was looking a way to have auto completion with git when checking out a branch. The solution was kind of obvious. The &lt;a href=&#34;https://github.com/git/git&#34;&gt;github git mirror repository&lt;/a&gt; has a &lt;a href=&#34;https://github.com/git/git/tree/master/contrib&#34;&gt;folder containing experimental tools&lt;/a&gt;. One of these tools is a shell scripts that enables completion for various git sub commands. Exactly what I was looking for.&lt;/p&gt;&#xA;&lt;p&gt;If you also want to make use of this feature, you can download the script with the command below:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Scripts for other shells are available.&lt;/p&gt;&#xA;&lt;p&gt;If you are bash user like I am, you can enable the completion script in your bash profile with the following command:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;test -f ~/.git-completion.bash &amp;amp;&amp;amp; . $_&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Using pass in teams</title>
      <link>https://janikvonrotz.ch/2018/04/03/using-pass-in-teams/</link>
      <pubDate>Tue, 03 Apr 2018 08:29:22 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2018/04/03/using-pass-in-teams/</guid>
      <description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.passwordstore.org/&#34;&gt;Pass&lt;/a&gt; is the standard password manager for Unix systems. It follows the &lt;a href=&#34;http://en.wikipedia.org/wiki/Unix_philosophy&#34;&gt;Unix philosophy&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Pass saves passwords in text files and encrypts them using a gpg key. The folder structure containing the encrypted files is the pass store. Sharing a pass store without handing over the gpg key requires a gpg key exchange. Git is integrated into the pass &lt;a href=&#34;https://en.wikipedia.org/wiki/Command-line_interface&#34;&gt;cli&lt;/a&gt; and is used as version control system.&lt;/p&gt;&#xA;&lt;p&gt;This document is a guideline for users which require access to a shared pass store and is also a documentation of how to set up a shared pass store. The first part elaborates the process of creating a shared pass store and the second part shows how collaboration from the perspective of a user looks like.&lt;/p&gt;&#xA;&lt;h2 id=&#34;variables&#34;&gt;Variables&lt;/h2&gt;&#xA;&lt;p&gt;In the document you will find different variables starting and ending with &lt;strong&gt;_&lt;/strong&gt; underscore. Below is a description of what those variables mean.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;$PROJECT_NAME: A unique name for the shared pass store folder.&#xA;$GIT_REMOTE_URL_: Remote url of the shared pass store git repository.&#xA;$PERSONAL_MAIL: Personal mail address which is used as gpg key id.&#xA;$TEAM_MAIL: Shared team mail address which is used for the shared gpg key id.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;setup-a-shared-pass-store&#34;&gt;Setup a shared pass store&lt;/h1&gt;&#xA;&lt;p&gt;Install pass using the package manager of your choice and setup a new personal store.&lt;/p&gt;&#xA;&lt;p&gt;Install pass using yum.&lt;br&gt;&#xA;&lt;code&gt;yum install pass&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you do not have a personal gpg key, create one. Make sure to set a correct mail address.&lt;br&gt;&#xA;&lt;code&gt;gpg --gen-key&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Initialize a personal pass store.&lt;br&gt;&#xA;&lt;code&gt;pass init $PERSONAL_MAIL&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Passwords are encrypted with a gpg key. In a team environment the gpg key should not impersonate somebody but rather the team itself. That is why a new gpg key is required.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg --gen-key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Real name:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; $TEAM_MAIL&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Email address:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; $TEAM_MAIL&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Confirm&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; O&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Enter the password&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; _PASSWORD_&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create a new pass store in a subfolder.&lt;br&gt;&#xA;&lt;code&gt;pass init -p $PROJECT_NAME $TEAM_MAIL&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Add the gpg test password to the new store.&lt;br&gt;&#xA;&lt;code&gt;pass generate $PROJECT_NAME/sharedpass 20&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Setup a git repo for the shared pass store.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/.password-store/$PROJECT_NAME&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git init&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git add .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git commit -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Init &lt;/span&gt;$PROJECT_NAME&lt;span style=&#34;color:#e6db74&#34;&gt; password store&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git remote add origin $GIT_REMOTE_URL_&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git push --set-upstream origin master&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add the gpg public key to the store.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir .gpg-keys&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg --output .gpg-keys/$TEAM_MAIL.gpg --export $TEAM_MAIL&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git add $TEAM_MAIL.gpg&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git commit -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Add &lt;/span&gt;$TEAM_MAIL&lt;span style=&#34;color:#e6db74&#34;&gt; public key&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git push&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The remote repo can be cloned as a subfolder into the existing pass store folders. Git will treat the subfolder as a git submodule.&lt;/p&gt;&#xA;&lt;h1 id=&#34;request-access-to-shared-pass-store&#34;&gt;Request access to shared pass store&lt;/h1&gt;&#xA;&lt;p&gt;In the following steps we assume that another member of the team requires access to the shared pass store.&lt;/p&gt;&#xA;&lt;p&gt;Clone the shared pass store repository.&lt;br&gt;&#xA;&lt;code&gt;git clone $GIT_REMOTE_URL_  ~/.password-store/$PROJECT_NAME&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The shared pass store is now available as subfolder to your personal pass store. If you have enabled git for the personal pass store the subfolder will be treated as git submodule. Changes in the shared pass store will not affect your personal store.&lt;/p&gt;&#xA;&lt;p&gt;In order to be able to decrypt the passwords in the shared pass store, the store key must be signed by the personal gpg key.&lt;/p&gt;&#xA;&lt;p&gt;List your gpg keys.&lt;br&gt;&#xA;&lt;code&gt;gpg --list-key&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Add the personal key to the shared pass store.&lt;br&gt;&#xA;&lt;code&gt;echo &amp;quot;$PERSONAL_MAIL&amp;quot; &amp;gt;&amp;gt; ~/.password-store/$PROJECT_NAME/.gpg-id&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;And export the public gpg key.&lt;br&gt;&#xA;&lt;code&gt;gpg --output ~/.password-store/$PROJECT_NAME/.gpg-keys/$PERSONAL_MAIL.gpg --export $PERSONAL_MAIL&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then submit a request by committing the gpg id.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/.password-store/$PROJECT_NAME&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git add .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git commit -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Request access for &lt;/span&gt;$PERSONAL_MAIL&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git push&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The receiver of this request is the owner of the shared pass store signer key &lt;code&gt;$TEAM_MAIL&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;grant-access-to-users&#34;&gt;Grant access to users&lt;/h1&gt;&#xA;&lt;p&gt;The owner of the signer key must sign all keys of new team members.&lt;/p&gt;&#xA;&lt;p&gt;First import the new keys.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/.password-store/$PROJECT_NAME/.gpg-keys&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg --import $PERSONAL_MAIL.gpg&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then sign the imported key.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg --local-user $TEAM_MAIL --sign-key $PERSONAL_MAIL&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg --edit-key $PERSONAL_MAIL&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Confirm&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; y&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# enter the passphrase for $TEAM_MAIL&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; save&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Reinitialize the password store.&lt;br&gt;&#xA;&lt;code&gt;pass init -e -p $PROJECT_NAME $(cat ~/.password-store/$PROJECT_NAME/.gpg-id)&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Push the changes.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/.password-store/$PROJECT_NAME&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git push&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The user should now be able the decrypt the password using the &lt;code&gt;$PERSONAL_MAIL&lt;/code&gt; key.&lt;/p&gt;&#xA;&lt;h1 id=&#34;contribute-to-a-shared-pass-store&#34;&gt;Contribute to a shared pass store&lt;/h1&gt;&#xA;&lt;p&gt;New password insertions must be encrypted with the &lt;code&gt;$TEAM_MAIL&lt;/code&gt; gpg key.&lt;/p&gt;&#xA;&lt;p&gt;The gpg key can be imported from the shared pass folder.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd ~/.password-store/$PROJECT_NAME/.gpg-keys&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg --import $TEAM_MAIL.gpg&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In order to encrypt new pass entries, you must trust the key.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg --edit-key $TEAM_MAIL.gpg&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; trust&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# exit the cli&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now you can start creating new entries using the &lt;a href=&#34;https://git.zx2c4.com/password-store/about/&#34;&gt;pass cli&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;notes&#34;&gt;Notes&lt;/h1&gt;&#xA;&lt;p&gt;If there is a gpg registry you can obtain the public keys from there. There would be no need to exchange public key as files.&lt;/p&gt;&#xA;&lt;h1 id=&#34;updates&#34;&gt;Updates&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;2019-10-16 Edit: Renamed the variables with a &amp;lsquo;$&amp;rsquo; prefix. Ensuring bash compatiblity.&lt;/em&gt;&lt;br&gt;&#xA;&lt;em&gt;2019-10-16 Edit: Updated guide for latest pass version.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;sources&#34;&gt;Sources&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.passwordstore.org&#34;&gt;Official pass homepage&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://medium.com/@davidpiegza/using-pass-in-a-team-1aa7adf36592&#34;&gt;Medium - Using pass in a team&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setup SSH on Windows 10</title>
      <link>https://janikvonrotz.ch/2018/01/19/setup-ssh-on-windows-10/</link>
      <pubDate>Fri, 19 Jan 2018 11:55:48 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2018/01/19/setup-ssh-on-windows-10/</guid>
      <description>&lt;p&gt;I have started a new job and as usual had to set up a new computer. Using Windows in a Unix environment seems like a bad choice at first. However, Microsoft has changed strategy and embraced the Unix world with projects such as Windows Subsystem for Linux (WSL) or Windows SQL Server support for Linux. In result you can install bash with &lt;a href=&#34;https://docs.microsoft.com/en-us/windows/wsl/install-win10&#34;&gt;WSL&lt;/a&gt; and use the native ssh client. But there is also another way. If you install &lt;a href=&#34;https://git-scm.com/download/win&#34;&gt;Git for Windows&lt;/a&gt; a ssh binary is shipped as well. This binary and other tools such as &lt;code&gt;ssh-keygen&lt;/code&gt; are not available from the command line by default. I want show you how to fix this, setup a keypair and start using ssh in a Windows environment.&lt;/p&gt;&#xA;&lt;p&gt;First install &lt;a href=&#34;https://git-scm.com/download/win&#34;&gt;Git for Windows&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Then add the folder &lt;code&gt;C:/Program Files/Git/usr/bin&lt;/code&gt; to the &lt;code&gt;PATH&lt;/code&gt; systen environment variable.&lt;/p&gt;&#xA;&lt;p&gt;Open a PowerShell session.&lt;/p&gt;&#xA;&lt;p&gt;Try out &lt;code&gt;ssh&lt;/code&gt;. It should be available now.&lt;/p&gt;&#xA;&lt;p&gt;Create a new ssh keypair by entering &lt;code&gt;ssh-keygen -t rsa -b 4096 -C _COMMENT_&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The keys are stored under &lt;code&gt;/c/Users/_USERNAME_/.ssh/id_rsa&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Make sure to create a backup of your private key and encrypt your drive.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Meteor productive deployment blank page</title>
      <link>https://janikvonrotz.ch/2016/06/21/meteor-productive-deployment-blank-page/</link>
      <pubDate>Tue, 21 Jun 2016 10:16:07 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2016/06/21/meteor-productive-deployment-blank-page/</guid>
      <description>&lt;p&gt;First some background. I&amp;rsquo;ve built a Meteor app and decided to deploy it to Heroku. There are many short and simple guides out there on how to do that. As I did so and opened the App for the first on Heroku I simply received a blank page. Where did my javascript code go? Heroku logs didn&amp;rsquo;t tell much.&lt;/p&gt;&#xA;&lt;p&gt;After googling this issue I was told that Heroku launches the App in productive mode or at least the buildpack I&amp;rsquo;ve used does so. So I tested this locally with &lt;code&gt;meteor --production&lt;/code&gt; and surprise got a blank page as well. So what does this flag change in the build process? It simply minifies the javascript code. So that is the problem. As my app is built with React written in ES6 the minification probably doesn&amp;rsquo;t work. The solution is quite simple, remove the Meteor package &lt;code&gt;standard-minifier-js&lt;/code&gt; from the project.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Download full playlists and all songs by an artist from SoundCloud</title>
      <link>https://janikvonrotz.ch/2014/05/13/download-full-playlists-and-all-songs-by-an-artist-from-soundcloud/</link>
      <pubDate>Tue, 13 May 2014 07:53:13 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2014/05/13/download-full-playlists-and-all-songs-by-an-artist-from-soundcloud/</guid>
      <description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;First of all I want to apologise for what I&amp;rsquo;m writing about in this post.&#xA;SoundCloud is a music platform where you can listen to almost every song for free.&#xA;This is a great network and only works as long users don&amp;rsquo;t download the songs from SoundCloud.&#xA;Great artists advertise their content to get more attention, the last thing they want is that you&amp;rsquo;ll download their songs.&#xA;However there&amp;rsquo;s no way to prevent people from doing so, as you will see not even the guys behind SoundCloud can prevent their content from being downloaded.&#xA;I&amp;rsquo;d ask you to donate for or buy the songs from the artists you like on SoundCloud.&lt;/p&gt;&#xA;&lt;h1 id=&#34;requirements&#34;&gt;Requirements&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/13/deploy-ubuntu-server/&#34;&gt;Ubuntu server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/25/install-ubuntu-packages/&#34;&gt;cURL, Git&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;instructions&#34;&gt;Instructions&lt;/h1&gt;&#xA;&lt;p&gt;Clone the Soundcloud music downloader repository from GitHub.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src&#xA;sudo git clone https://github.com/lukapusic/soundcloud-dl.git&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Run the the installer script. This will install the required ubuntu packages and create a config file in your home folder.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd soundcloud-dl/&#xA;sudo ./install&#xA;Set path : /home/[username]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Switch to your home folder and start downloading from a SoundCloud url.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd ~&#xA;./usr/local/src/scdl [url]&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Install Node</title>
      <link>https://janikvonrotz.ch/2014/03/27/install-node/</link>
      <pubDate>Thu, 27 Mar 2014 16:46:14 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2014/03/27/install-node/</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is part of my &lt;a href=&#34;https://janikvonrotz.ch/your-own-virtual-private-server-hosting-solution/&#34;&gt;Your own Virtual Private Server hosting solution&lt;/a&gt; project.&lt;/em&gt;&lt;br&gt;&#xA;&lt;em&gt;Get the latest version of this article here: &lt;a href=&#34;https://gist.github.com/9346588&#34;&gt;https://gist.github.com/9346588&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;Node.js is a cross-platform runtime environment for server-side and networking applications.&lt;/p&gt;&#xA;&lt;h1 id=&#34;requirements&#34;&gt;Requirements&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/13/deploy-ubuntu-server/&#34;&gt;Ubuntu server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/25/install-ubuntu-development-libraries/&#34;&gt;build-essential&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/25/install-ubuntu-packages/&#34;&gt;Git&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;&#xA;&lt;p&gt;You can install Node.js either from website or the from the git repo.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-from-source&#34;&gt;Install from source&lt;/h2&gt;&#xA;&lt;p&gt;Download Node.js with wget.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src&#xA;sudo wget http://nodejs.org/dist/node-latest.tar.gz&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Unpack Node.js.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo tar -xzf node-latest.tar.gz&#xA;cd node-&amp;lt;version&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install Node.js.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check version of Node.js and npm.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;node -v&#xA;npm -v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;install-with-git&#34;&gt;Install with Git&lt;/h2&gt;&#xA;&lt;p&gt;Clone the Node.js repo.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src&#xA;sudo git clone git://github.com/joyent/node.git&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or use the https url if ssh is not possible.&lt;/p&gt;&#xA;&lt;p&gt;sudo git &lt;a href=&#34;https://github.com/joyent/node.git&#34;&gt;https://github.com/joyent/node.git&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Check git tags to find the latest version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd node&#xA;git tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;See the latest stable version on &lt;a href=&#34;http://nodejs.org/&#34;&gt;http://nodejs.org/&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Checkout the latest version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo git checkout vX.X.X&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install Node.js.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check version of Node.js and npm.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;node -v&#xA;npm -v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;update&#34;&gt;Update&lt;/h1&gt;&#xA;&lt;p&gt;Depending on how you&amp;rsquo;ve installed Node.js theres an update strategy.&lt;/p&gt;&#xA;&lt;h2 id=&#34;from-source&#34;&gt;from source&lt;/h2&gt;&#xA;&lt;p&gt;Repeat the installation process above.&lt;/p&gt;&#xA;&lt;h2 id=&#34;with-git&#34;&gt;with Git&lt;/h2&gt;&#xA;&lt;p&gt;Pull down the latest source code.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src/node&#xA;sudo git checkout master&#xA;sudo git pull origin master&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check git tags to find the latest version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;See the latest stable version on &lt;a href=&#34;http://nodejs.org/&#34;&gt;http://nodejs.org/&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Compile the latest version.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo git checkout vx.x.x&#xA;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Step by Step: Install Ghost Blog</title>
      <link>https://janikvonrotz.ch/2014/03/03/step-by-step-install-ghost-blog/</link>
      <pubDate>Mon, 03 Mar 2014 16:34:55 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2014/03/03/step-by-step-install-ghost-blog/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Latest Version of this guide: &lt;a href=&#34;https://gist.github.com/8542013&#34;&gt;https://gist.github.com/8542013&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Finishing this guide you&amp;quot;ll get:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A running Ghost installation&lt;/li&gt;&#xA;&lt;li&gt;Amazon SES mail configuration&lt;/li&gt;&#xA;&lt;li&gt;Simple ssh hardenings&lt;/li&gt;&#xA;&lt;li&gt;Nginx proxy&lt;/li&gt;&#xA;&lt;li&gt;Node.js configured with forever&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Specification of latest running installation:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Date: 21.01.2014&lt;/li&gt;&#xA;&lt;li&gt;OS: Ubuntu 64 bit - 12.04.4 LTS&lt;/li&gt;&#xA;&lt;li&gt;Provider: Amazon EC2&lt;/li&gt;&#xA;&lt;li&gt;Mail service: Amazon SES&lt;/li&gt;&#xA;&lt;li&gt;Browser: Google Chrome - 31.0.1650.63&lt;/li&gt;&#xA;&lt;li&gt;Ghost: 0.4&lt;/li&gt;&#xA;&lt;li&gt;Node: 0.10.24&lt;/li&gt;&#xA;&lt;li&gt;npm: 1.3.21&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Requirements&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Server is behind a firewall, that only allows http, https and ssh&lt;/li&gt;&#xA;&lt;li&gt;The server is accessed with ssh keys (user password authentication must be disabled)&lt;/li&gt;&#xA;&lt;li&gt;Server is not accessed with the root user&lt;/li&gt;&#xA;&lt;li&gt;You&amp;quot;re able to edit files with &lt;a href=&#34;http://www.cheatography.com/ericg/cheat-sheets/vi-editor/&#34;&gt;VI&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;ubuntu&#34;&gt;Ubuntu&lt;/h2&gt;&#xA;&lt;p&gt;Update Ubuntu&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install additional packages&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo aptitude install build-essential zip git&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;ssh&#34;&gt;SSH&lt;/h2&gt;&#xA;&lt;p&gt;Change the default ssh port and disable root login&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo vi /etc/ssh/sshd_config&#xA;Set Port [custom ssh port number]&#xA;Set PermitRootLogin no&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Restart the ssh service&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo /etc/init.d/ssh restart&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Update firewall rules now to enable ssh connection with your custom port&lt;/p&gt;&#xA;&lt;p&gt;Reconnect your ssh host with the new port number&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;ssh -p [custom ssh port number] user@host&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;fail2ban&#34;&gt;Fail2Ban&lt;/h2&gt;&#xA;&lt;p&gt;Install Fail2Ban&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo apt-get install fail2ban&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Copy the configuration file&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Edit the config file&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo vi /etc/fail2ban/jail.local&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Make the following changes:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[ssh]&#xA;port     = [custom ssh port number]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;[ssh-ddos]&#xA;enabled  = true&#xA;port     = [custom ssh port number]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Finish editing and restart fail2ban service&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo service fail2ban restart&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;network&#34;&gt;Network&lt;/h2&gt;&#xA;&lt;p&gt;Edit the network configuration file&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo vi /etc/sysctl.conf&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Paste the this configuration file to improve network security&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#&#xA;# /etc/sysctl.conf - Configuration file for setting system variables&#xA;# See /etc/sysctl.d/ for additional system variables&#xA;# See sysctl.conf (5) for information.&#xA;#&#xA;&#xA;# Uncomment the next two lines to enable Spoof protection (reverse-path filter)&#xA;# Turn on Source Address Verification in all interfaces to&#xA;# prevent some spoofing attacks&#xA;net.ipv4.conf.default.rp_filter=1&#xA;net.ipv4.conf.all.rp_filter=1&#xA;&#xA;# Uncomment the next line to enable TCP/IP SYN cookies&#xA;net.ipv4.tcp_syncookies=1&#xA;net.ipv4.tcp_max_syn_backlog = 2048&#xA;net.ipv4.tcp_synack_retries = 2&#xA;net.ipv4.tcp_syn_retries = 5&#xA;&#xA;# Do not accept ICMP redirects (prevent MITM attacks)&#xA;net.ipv4.conf.all.accept_redirects = 0&#xA;net.ipv6.conf.all.accept_redirects = 0&#xA;net.ipv4.conf.default.accept_redirects = 0 &#xA;net.ipv6.conf.default.accept_redirects = 0&#xA;&#xA;# Do not send ICMP redirects (we are not a router)&#xA;net.ipv4.conf.all.send_redirects = 0&#xA;net.ipv4.conf.default.send_redirects = 0&#xA;&#xA;# Do not accept IP source route packets (we are not a router)&#xA;net.ipv4.conf.all.accept_source_route = 0&#xA;net.ipv6.conf.all.accept_source_route = 0&#xA;net.ipv4.conf.default.accept_source_route = 0&#xA;net.ipv6.conf.default.accept_source_route = 0&#xA;&#xA;# Log Martian Packets&#xA;net.ipv4.conf.all.log_martians = 1&#xA;net.ipv4.icmp_ignore_bogus_error_responses = 1&#xA;&#xA;# Ignore ICMP broadcast requests&#xA;net.ipv4.icmp_echo_ignore_broadcasts = 1&#xA;&#xA;# Ignore Directed pings&#xA;net.ipv4.icmp_echo_ignore_all = 1&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;nodejs&#34;&gt;Node.js&lt;/h2&gt;&#xA;&lt;p&gt;You can install node either from website or the from the git repo.&lt;/p&gt;&#xA;&lt;h3 id=&#34;install-from-source&#34;&gt;Install from source&lt;/h3&gt;&#xA;&lt;p&gt;Download Node.js with wget&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;wget http://nodejs.org/dist/node-latest.tar.gz&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Unpack Node.js&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;tar -xzf node-latest.tar.gz&#xA;cd [node folder]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install Node.js&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check version of Node.js and npm&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;node -v&#xA;npm -v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;install-with-git&#34;&gt;Install with Git&lt;/h3&gt;&#xA;&lt;p&gt;Clone the Node.js repo&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src&#xA;sudo git clone git://github.com/joyent/node.git&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check git tags to find the latest version&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd node&#xA;git tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;See the latest stable version on &lt;a href=&#34;http://nodejs.org/&#34;&gt;http://nodejs.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Checkout the latest version&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo git checkout vX.X.X&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install Node.js&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check version of Node.js and npm&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;node -v&#xA;npm -v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;update-nodejs&#34;&gt;Update Node.js&lt;/h2&gt;&#xA;&lt;p&gt;Depending on how you&amp;quot;ve installed Node.js theres an update strategy&lt;/p&gt;&#xA;&lt;h3 id=&#34;from-source&#34;&gt;from source&lt;/h3&gt;&#xA;&lt;p&gt;Repeat the installation process above&lt;/p&gt;&#xA;&lt;h3 id=&#34;with-git&#34;&gt;with Git&lt;/h3&gt;&#xA;&lt;p&gt;Pull down the latest source code&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /usr/local/src/node&#xA;sudo git checkout master&#xA;sudo git pull origin master&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check git tags to find the latest version&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git tag&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;See the latest stable version on &lt;a href=&#34;http://nodejs.org/&#34;&gt;http://nodejs.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Compile the latest version&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo git checkout vx.x.x&#xA;sudo ./configure&#xA;sudo make&#xA;sudo make install&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;nginx&#34;&gt;Nginx&lt;/h2&gt;&#xA;&lt;p&gt;Install Nginx&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo apt-get install nginx&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Create a Nginx site configuration file&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo touch /etc/nginx/sites-available/ghost.conf&#xA;sudo vi /etc/nginx/sites-available/ghost.conf&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Paste this config&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;server {&#xA;&#x9;listen 80;&#xA;&#x9;server_name [example.com];&#xA;&#xA;&#x9;location / {&#xA;&#x9;&#x9;proxy_set_header   X-Real-IP $remote_addr;&#xA;&#x9;&#x9;proxy_set_header   Host      $http_host;&#xA;&#x9;&#x9;proxy_pass         http://127.0.0.1:2368;&#xA;&#x9;}&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Create a symlink to your config file&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo ln -s /etc/nginx/sites-available/ghost.conf /etc/nginx/sites-enabled/ghost.conf&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Restart Ngnix&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo service nginx restart&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In case you&amp;quot;ll get this error&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Restarting nginx: nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 64&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Do&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo vi /etc/nginx/nginx.conf&#xA;Set server_names_hash_bucket_size 128;&#xA;sudo service nginx restart&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;ghost&#34;&gt;Ghost&lt;/h2&gt;&#xA;&lt;p&gt;Create the website folder&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo mkdir -p /var/www/&#xA;cd /var/www/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Download Ghost with wget&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo wget https://ghost.org/zip/ghost-latest.zip&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Unpack Ghost&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo unzip -d ghost ghost-latest.zip&#xA;cd ghost/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install Ghost&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo npm install --production&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In case of errors for sqlite3 installation&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;npm install sqlite3 --build-from-source&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Install forever&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo npm install forever -g&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Configure Ghost (productive environment only)&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo cp config.example.js config.js&#xA;sudo vi config.js&#xA;Set url: &amp;quot;http://[example.com]&amp;quot;,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Start Ghost&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo NODE_ENV=production forever start index.js&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Start Ghost without forever&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo npm start --production&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Check if Ghost is running&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;forever list&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Stop Ghost&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;forever stop index.js&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Register your Ghost Account&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Open your browser on http://[example.com]/ghost&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;ghost-mail&#34;&gt;Ghost Mail&lt;/h2&gt;&#xA;&lt;p&gt;Ghost uses &lt;a href=&#34;https://github.com/andris9/Nodemailer&#34;&gt;Nodemailer&lt;/a&gt; to send e-mails, this modules has to be configured.&#xA;Ghost supports various mail providers, you can see all of them in the &lt;a href=&#34;http://docs.ghost.org/mail/&#34;&gt;Ghost mail documentation&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;ses&#34;&gt;SES&lt;/h3&gt;&#xA;&lt;p&gt;Amazon&amp;rsquo;s SES (Simple EMail Service) provides a reliable service to send mails.&lt;/p&gt;&#xA;&lt;p&gt;Requirements&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Amazon Account&lt;/li&gt;&#xA;&lt;li&gt;Verified domain and mail address on SES&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Create a new user in the &lt;a href=&#34;https://console.aws.amazon.com/iam/#users&#34;&gt;IAM service console&lt;/a&gt; and store the access keys in a  secure place.&lt;/p&gt;&#xA;&lt;p&gt;Allow new user to send mail via SES with this policy configuration&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{&#xA;  &amp;#34;Version&amp;#34;: &amp;#34;2012-10-17&amp;#34;,&#xA;  &amp;#34;Statement&amp;#34;: [&#xA;    {&#xA;      &amp;#34;Effect&amp;#34;: &amp;#34;Allow&amp;#34;,&#xA;      &amp;#34;Action&amp;#34;: &amp;#34;ses:SendRawEmail&amp;#34;,&#xA;      &amp;#34;Resource&amp;#34;: &amp;#34;*&amp;#34;&#xA;    }&#xA;  ]&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Edit the Ghost config&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo vi config.js&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Add this mail configuration&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mail: {&#xA;    transport: &amp;#34;SES&amp;#34;,&#xA;    options: {&#xA;        AWSAccessKeyID: &amp;#34;[acccess key]&amp;#34;,&#xA;        AWSSecretKey: &amp;#34;[secret key]&amp;#34;&#xA;    }&#xA;},&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Update mail settings&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;http://[example.com]/ghost/settings/general/&#xA;Set Email Address: [verified SES mail address]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo vi config.js&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And add this mail configuration&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;mail: {&#xA;&#x9;fromaddress: &amp;quot;[verified SES mail address]&amp;quot;,&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now you should be able to reset your Ghost password&lt;/p&gt;&#xA;&lt;p&gt;However at the time of writting this mail configuration doesn&amp;quot;t seem to work despite it&amp;quot;s an offical Ghost configuration&lt;/p&gt;&#xA;&lt;p&gt;In case you&amp;quot;ll get this error when trying to reset your password&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Email Error: Email failed: 400 Sender MessageRejected Email address is not verified. 5a07d838-8381-11e3-ad96-5f67c4a04b97&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Replace the the Ghost mail configuration with&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mail: {&#xA;    transport: &amp;#34;SMTP&amp;#34;,&#xA;    fromaddress: &amp;#34;[verified SES mail address]&amp;#34;,&#xA;    host: &amp;#34;ssl://[SES smpt server address]&amp;#34;,&#xA;    options: {&#xA;        port: 465,&#xA;        service: &amp;#34;SES&amp;#34;,&#xA;        auth: {&#xA;            user: &amp;#34;[acccess key]&amp;#34;,&#xA;            pass: &amp;#34;[secret key]&amp;#34;&#xA;        }&#xA;    }&#xA;},&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can get your smtp settings &lt;a href=&#34;https://console.aws.amazon.com/ses/home?#smtp-settings:&#34;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;source&#34;&gt;Source&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/joyent/node/wiki/Installation&#34;&gt;Install Node&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;http://davidtsadler.com/archives/2012/05/06/installing-node-js-on-ubuntu/&#34;&gt;Install Node on Ubuntu&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;http://docs.ghost.org/installation/linux/&#34;&gt;Install Ghost&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;http://docs.ghost.org/installation/deploy/&#34;&gt;Deployment of Ghost&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;http://docs.ghost.org/installation/troubleshooting/&#34;&gt;sqlite3 troubleshooting&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;http://charles.lescampeurs.org/2008/11/14/fix-nginx-increase-server_names_hash_bucket_size&#34;&gt;nginx fix hash buck size&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;http://0v.org/installing-ghost-on-ubuntu-nginx-and-mysql/#.Ut5q2RBwZaQ&#34;&gt;Install Ghost on Ubuntu, Nginx and MySQL&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://www.digitalocean.com/community/articles/how-to-protect-ssh-with-fail2ban-on-ubuntu-12-04&#34;&gt;Fail2Ban SSH Hardening&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://github.com/niftylettuce/amazon-ec2-node-stack&#34;&gt;Amazon EC2 Node Stack&lt;/a&gt;&lt;br&gt;&#xA;&lt;a href=&#34;https://blog.ls20.com/install-ghost-0-3-3-with-nginx-and-modsecurity/#settingupemailonghost&#34;&gt;SES mail configuration&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Backup Public GitHub Gists</title>
      <link>https://janikvonrotz.ch/2013/09/19/backup-public-github-gists/</link>
      <pubDate>Thu, 19 Sep 2013 12:52:32 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2013/09/19/backup-public-github-gists/</guid>
      <description>&lt;p&gt;To manage my code snippets I&amp;rsquo;m using &lt;!-- raw HTML omitted --&gt;GitHubGist &lt;!-- raw HTML omitted --&gt;connected with &lt;!-- raw HTML omitted --&gt;Gistbox&lt;!-- raw HTML omitted --&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Sadly none of this services providing a backup nor a download function for the gist files. That&amp;rsquo;s why I came upwith the idea to download them with PowerShell script.&lt;/p&gt;&#xA;&lt;p&gt;For first my script only can download public gists, because I don&amp;rsquo;t know how to implement an authentication, luckily each of my gists is public. I recommend you to do the same, it&amp;rsquo;s the idea of OpenSource.&lt;/p&gt;&#xA;&lt;p&gt;So here&amp;rsquo;s the script:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[&lt;span style=&#34;color:#66d9ef&#34;&gt;System.Reflection.Assembly&lt;/span&gt;]::LoadWithPartialName(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;System.Web.Extensions&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; Get-GitHubGists{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;param&lt;/span&gt;(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [&lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;]$UserUrl&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# set up request&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $WebRequest = [&lt;span style=&#34;color:#66d9ef&#34;&gt;System.Net.WebRequest&lt;/span&gt;]::Create($UserUrl)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $WebRequest.Method =&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;GET&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $WebRequest.ContentLength = &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# get response&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $WebRequest = $WebRequest.GetResponse()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $WebRequest = new-object System.IO.StreamReader($WebRequest.GetResponseStream())&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $WebResponse = $WebRequest.ReadToEnd()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# convert json&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $JavaScriptSerializer = New-Object System.Web.Script.Serialization.JavaScriptSerializer&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $GitHubGists = $JavaScriptSerializer.DeserializeObject($WebResponse)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#75715e&#34;&gt;# download github gists&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    $GitHubGists | %{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;(Test-Path $_.id){&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            cd ($_.id)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            Write-Host &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Update GitHubGist: &lt;/span&gt;$($_.description)&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            git pull&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            cd ..&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }&lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt;{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            Write-Host &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Cloning GitHubGist: &lt;/span&gt;$($_.description)&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            git clone ($_.git_pull_url)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Get-GitHubGists -UserUrl https&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;:&lt;/span&gt;//api.github.com/users/janikvonrotz/gists&lt;span style=&#34;color:#66d9ef&#34;&gt;?&lt;/span&gt;page=&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Get-GitHubGists -UserUrl https&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;:&lt;/span&gt;//api.github.com/users/janikvonrotz/gists&lt;span style=&#34;color:#66d9ef&#34;&gt;?&lt;/span&gt;page=&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Get-GitHubGists -UserUrl https&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;:&lt;/span&gt;//api.github.com/users/janikvonrotz/gists&lt;span style=&#34;color:#66d9ef&#34;&gt;?&lt;/span&gt;page=&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Latest version: &lt;!-- raw HTML omitted --&gt;&lt;a href=&#34;https://gist.github.com/6622205&#34;&gt;https://gist.github.com/6622205&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
