<?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 J. Fernando Sánchez</title><link>https://balkian.com/tags/git/</link><description>Recent content in Git on J. Fernando Sánchez</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Fri, 10 Apr 2015 17:47:00 +0000</lastBuildDate><atom:link href="https://balkian.com/tags/git/index.xml" rel="self" type="application/rss+xml"/><item><title>Sharing dotfiles</title><link>https://balkian.com/p/sharing-dotfiles/</link><pubDate>Fri, 10 Apr 2015 17:47:00 +0000</pubDate><guid>https://balkian.com/p/sharing-dotfiles/</guid><description>&lt;p>Today&amp;rsquo;s post is half a quick note, half public shaming. In other words,
it is a reminder to be very careful with OAuth tokens and passwords.&lt;/p>
&lt;p>As part of moving to emacs, I starting using the incredibly useful
&lt;a class="link" href="https://github.com/defunkt/gist.el" target="_blank" rel="noopener"
>gh.el&lt;/a>. When you first use it, the
extension saves either your password or an OAuth token in your
.gitconfig file. This is cool and convenient, unless you &lt;a class="link" href="https://github.com/balkian/dotfiles" target="_blank" rel="noopener"
>happen to be
publishing your .gitconfig file in a public
repo&lt;/a>.&lt;/p>
&lt;p>So, how can you still share your gitconfig without sharing your
password/token with the rest of the world? Since Git 1.7.0, you can
&lt;a class="link" href="http://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig" target="_blank" rel="noopener"
>include other files in your
gitconfig&lt;/a>.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">[include]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> path = ~/.gitconfig_secret
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>And now, in your .gitconfig_secret file, you just have to add this:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">[github]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> user = balkian
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> token = &amp;#34;&amp;lt; Your secret token &amp;gt;&amp;#34;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Remove git files with globbing</title><link>https://balkian.com/p/remove-git-files-with-globbing/</link><pubDate>Thu, 22 Aug 2013 23:14:00 +0000</pubDate><guid>https://balkian.com/p/remove-git-files-with-globbing/</guid><description>&lt;p>A simple trick. If you want to remove all the &amp;lsquo;.swp&amp;rsquo; files from a git
repository, just use:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">git rm --cached &lt;span class="s1">&amp;#39;**.swp&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Creating my web</title><link>https://balkian.com/p/creating-my-web/</link><pubDate>Thu, 22 Aug 2013 14:14:22 +0000</pubDate><guid>https://balkian.com/p/creating-my-web/</guid><description>&lt;p>I&amp;rsquo;ve finally decided to set up a decent personal page. I have settled
for github-pages because I like the idea of keeping my site in a
repository and having someone else host and deploy it for me. The site
will be really simple, mostly static files. Thanks to Github,
&lt;a class="link" href="http://jekyllrb.com" target="_blank" rel="noopener"
>Jekyll&lt;/a> will automatically generate static pages
for my posts every time I commit anything new to this repository.&lt;/p>
&lt;p>But Jekyll can be used independently, so if I ever choose to host the
site myself, I can do it quite easily. Another thing that I liked about
this approach is that the generated html files can be used in the
future, and I will not need Jekyll to serve it. Jekyll is really simple
and most of the things are written in plain html. That means that
everything could be easily reused if I ever choose to change to another
blogging framework (e.g. pelical). But, for the time being, I like the
fact that Github takes care of the compilation as well, so I can simply
modify or add files through the web interface should I need to.&lt;/p>
&lt;p>I hadn&amp;rsquo;t played with HTML and CSS for a while now, so I also wanted to
use this site as a playground. At some point, I realised I was doing
mostly everything in plain HTML and CSS, and decided to keep it like
that for as long as possible. As of this writing, I haven&amp;rsquo;t included
any Javascript code in the page. Probably I will use some to add my
&lt;a class="link" href="http://gist.github.com/balkian" target="_blank" rel="noopener"
>gists&lt;/a> and
&lt;a class="link" href="http://github.com/balkian" target="_blank" rel="noopener"
>repositories&lt;/a>, but we will see about that.&lt;/p>
&lt;p>I think the code speaks for itself, so you can check out &lt;a class="link" href="http://github.com/balkian/balkian.github.com" target="_blank" rel="noopener"
>my repository
on Github&lt;/a>. You can clone
and deploy it easily like this:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">git clone
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">https://github.com/balkian/balkian.github.com &lt;span class="nb">cd&lt;/span> balkian.github.com
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">jekyll serve -w
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>I will keep updating this post with information about:&lt;/p>
&lt;ul>
&lt;li>Some Jekyll plugins that might be useful&lt;/li>
&lt;li>What CSS tricks I learnt&lt;/li>
&lt;li>The webfonts I used&lt;/li>
&lt;li>The badge on the left side of the page&lt;/li>
&lt;/ul></description></item></channel></rss>