<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yan Pritzker &#187; tips</title>
	<atom:link href="http://yanpritzker.com/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://yanpritzker.com</link>
	<description>photographer, entrepreneur, software engineer, musician, skier</description>
	<lastBuildDate>Sat, 21 Jan 2012 01:18:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<atom:link rel="next" href="http://yanpritzker.com/category/tips/feed/?page=2" />

		<item>
		<title>Get twitter @replies on your phone with pingie and summize</title>
		<link>http://yanpritzker.com/2008/07/03/get-twitter-replies-on-your-phone-with-pingie-and-summize/</link>
		<comments>http://yanpritzker.com/2008/07/03/get-twitter-replies-on-your-phone-with-pingie-and-summize/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 15:30:38 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[thoughts]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://skwpspace.com/?p=175</guid>
		<description><![CDATA[While twitter is out repairing its architecture, they seem to have turned off the track feature. track used to be an incredibly useful feature that is very well hidden as a twitter command instead of a part of their UI (epic design fail, or maybe they want it this way). Here&#8217;s how to use a [...]]]></description>
			<content:encoded><![CDATA[<p>While twitter is out repairing its architecture, they seem to have turned off the <code>track</code> feature. <code>track</code> used to be an incredibly useful feature that is very well hidden as a twitter command instead of a part of their UI (epic design fail, or maybe they want it this way). Here&#8217;s how to use a combination of services to simulate the same feature, and get your @replies on your phone. </p>
<p><b>Step 1:</b> do a search for &#8216;@yourname&#8217; on <a href="http://summize.com">summize</a>, then copy the link for the feed. If you&#8217;re lazy, that link looks like this: <code>http://summize.com/search.rss?q=%40<b>your_username_here</b></code>. </p>
<p><b>Step 2:</b> use <a href="http://pingie.com">pingie</a>, a free rss to sms converter. Put in the feed link you got in Step 1, your phone number, and your email. Confirm pingie service via the SMS they send you. You can also do this at Yahoo Alerts <a href="http://alerts.yahoo.com/edit_feedalert.php?.done=http://alerts.yahoo.com/myalerts.php">rss to sms</a></p>
<p><b>Step 3:</b> Profit!</p>
<p><b>Update:</b> after running this way for a couple days I disovered that pingie has completely failed to deliver any updates to my phone (maybe because of Helio/Sprint), while the Yahoo solution has delivered duplicates with extreme delay. Making both solutions an epic fail. Still looking for a solid rss to sms solution that does what it says it does. </p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2008/07/03/get-twitter-replies-on-your-phone-with-pingie-and-summize/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Git rm pending files</title>
		<link>http://yanpritzker.com/2008/06/10/git-rm-pending-files/</link>
		<comments>http://yanpritzker.com/2008/06/10/git-rm-pending-files/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 06:28:55 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://skwpspace.com/?p=165</guid>
		<description><![CDATA[If you&#8217;ve deleted a bunch of files in your directory, here&#8217;s a handy bash alias to git rm the changes into your index. alias gitrm="git stat &#124; grep deleted &#124; awk '{print $3}' &#124; xargs git rm" Update: turns out git add -u takes care of deleted files.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve deleted a bunch of files in your directory, here&#8217;s a handy bash alias to <code>git rm</code> the changes into your index.</p>
<p><strike><br />
<code><br />
alias gitrm="git stat | grep deleted | awk '{print $3}' | xargs git rm"<br />
</code><br />
</strike></p>
<p><b>Update:</b> turns out <code>git add -u</code> takes care of deleted files.</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2008/06/10/git-rm-pending-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Helpful shortcuts for git svn</title>
		<link>http://yanpritzker.com/2008/05/28/helpful-shortcuts-for-git-svn/</link>
		<comments>http://yanpritzker.com/2008/05/28/helpful-shortcuts-for-git-svn/#comments</comments>
		<pubDate>Wed, 28 May 2008 03:06:59 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://skwpspace.com/?p=159</guid>
		<description><![CDATA[Tired of having to stash your changes when you want to grab the latest from svn or want to dcommit one file while keeping others in your working tree? In your bash profile: alias svnpull='git stash &#038;&#038; git svn rebase &#038;&#038; git stash apply' alias svnpush='git stash &#038;&#038; git svn dcommit &#038;&#038; git stash apply']]></description>
			<content:encoded><![CDATA[<p>Tired of having to stash your changes when you want to grab the latest from svn or want to dcommit one file while keeping others in your working tree?</p>
<p>In your bash profile:</p>
<pre><code>
alias svnpull='git stash &#038;&#038; git svn rebase &#038;&#038; git stash apply'
alias svnpush='git stash &#038;&#038; git svn dcommit &#038;&#038; git stash apply'
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2008/05/28/helpful-shortcuts-for-git-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git tips &amp; tricks part 4: more on cherry picking</title>
		<link>http://yanpritzker.com/2008/05/13/git-tips-tricks-part-4-more-on-cherry-picking/</link>
		<comments>http://yanpritzker.com/2008/05/13/git-tips-tricks-part-4-more-on-cherry-picking/#comments</comments>
		<pubDate>Tue, 13 May 2008 21:06:02 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://skwpspace.com/?p=152</guid>
		<description><![CDATA[In my previous post I discussed how it was possible to merge individual changes from one branch to another. At that time I mentioned using the log on the original branch to figure out which changes were available to merge, but it turns out there&#8217;s an easier way. Let&#8217;s say you made some changes in [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://skwpspace.com/2008/05/13/git-tips-and-tricks-part-3-working-with-svn-branches-and-cherry-pick/">previous post</a> I discussed how it was possible to merge individual changes from one branch to another. At that time I mentioned using the log on the original branch to figure out which changes were available to merge, but it turns out there&#8217;s an easier way.</p>
<p>Let&#8217;s say you made some changes in local-trunk and you want to merge them into your branch-1.5 which is your release branch. From the branch:</p>
<p><code>
<pre>
git cherry -v local-trunk
+ 08d7780de7e16a22b7e8ed1d42acebc4bc07573f  a changeset i haven't merged yet
- 78a7b285089c76664a530f68803259c53cbadb42 another change
</pre>
<p></code></p>
<p>Each line indicates a change. If it has a &#8220;+&#8221; it means they only exist in the local-trunk. A minus indicates changes that have already been merged in. Magic! Now that you know which changes you want, just cherry-pick them in.</p>
<p><code>git cherry-pick 08d7780de</code></p>
<p><b>Update:</b> here&#8217;s another cool trick to see where every branch is at</p>
<p><code>git branch -v</code></p>
<p>Output looks like this:</p>
<pre>
branch        317544a #520 fix single page build<br />
local-trunk   ec85f65 #520 fix single page build</p>
<pre>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2008/05/13/git-tips-tricks-part-4-more-on-cherry-picking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git tips and tricks part 3: working with svn branches and cherry-pick</title>
		<link>http://yanpritzker.com/2008/05/13/git-tips-and-tricks-part-3-working-with-svn-branches-and-cherry-pick/</link>
		<comments>http://yanpritzker.com/2008/05/13/git-tips-and-tricks-part-3-working-with-svn-branches-and-cherry-pick/#comments</comments>
		<pubDate>Tue, 13 May 2008 03:37:01 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[scm]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://skwpspace.com/?p=151</guid>
		<description><![CDATA[After several weeks of git usage, I&#8217;ve developed a nice workflow. First, we&#8217;ll start with working with several svn branches via git. Working with svn branches via git Assuming you&#8217;ve properly cloned your svn repository, you should have your trunk and remote branches fetched from svn. You can see the remote branches via git branch [...]]]></description>
			<content:encoded><![CDATA[<p>After several weeks of git usage, I&#8217;ve developed a nice workflow. First, we&#8217;ll start with working with several svn branches via git.</p>
<p><b>Working with svn branches via git</b></p>
<p>Assuming you&#8217;ve properly cloned your svn repository, you should have your trunk and remote branches fetched from svn. You can see the remote branches via </p>
<p><code>git branch -r</code></p>
<p>If you have colorization turned on, then</p>
<p><code>git branch -a </code></p>
<p>Will give you all your branches (local and remote) and color the remote ones in red. The way you want to work is to create a local git branch for every svn branch you&#8217;re working with. So you might do something like</p>
<p><code>git branch local-trunk trunk</code><br />
<code>git branch local-1.5 branches/1.5</code></p>
<p>This will create two local branches (called local-trunk, and local-1.5 respectively) that follow the corresponding remote branches (trunk, and branches/1.5).</p>
<p>Now we&#8217;ll switch to the trunk&#8230;</p>
<p><code>git checkout local-trunk</code></p>
<p>Do some hacking, and commit the change</p>
<p><code>git commit -a -m "this is my hack"</code></p>
<p>Let&#8217;s say this was a bugfix and you also need to apply it to the branch. Switch to the branch:</p>
<p><code>git checkout local-1.5</code></p>
<p>To pull individual fixes from trunk you can cherry-pick the fix by its commit hash, which you obtained when you committed or via a log.</p>
<p><code>git cherry-pick 234adsfa7s8dfasdf</code></p>
<p>This will automatically pull in the change and commit it to your branch. If you don&#8217;t want to immediately commit but want to mess with the files first, then use the <code>-n</code> switch, which merges in the fix but doesn&#8217;t commit it. Then you&#8217;ll want to <code>git svn dcommit</code> to push your change out to the svn branch. This procedure is much faster than using svnmerge.py.</p>
<p><b>Nonstandard or wacky branch structure</b></p>
<p>It so happens that my repository is set up in a slightly nonstandard way due to a particular legacy. Instead of having a structure such as foo/trunk and foo/branches, I have trunk/foo and branches/[branchname]/foo. As it turns out, git supports this very well as long as you specify the format using wildcards in your <code>.git/config</code></p>
<p><code>
<pre>
[svn-remote "svn"]
  url = http://www.myrepo.com/svn/parent
  fetch = trunk/foo:refs/remotes/foo/trunk
  branches = branches/*/foo:refs/remotes/foo/branches/*
</pre>
<p></code></p>
<p>The format of this file basically has two parts separated by a colon. The first part tells git what the repo looks on the svn side. The second tells it what to call the branches that git creates to correspond to the ones out in svn. You&#8217;ll notice the placement of the wildcard on the third line is what generates all the branches correctly.</p>
<p><b>Note:</b> Please see <a href="http://skwpspace.com/category/git/">all posts tagged git</a> for the rest of the series.</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2008/05/13/git-tips-and-tricks-part-3-working-with-svn-branches-and-cherry-pick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Useful git commands and quirks</title>
		<link>http://yanpritzker.com/2008/04/22/useful-git-commands-and-quirks/</link>
		<comments>http://yanpritzker.com/2008/04/22/useful-git-commands-and-quirks/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 05:00:34 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[sourcecontrol]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://skwpspace.com/2008/04/22/useful-git-commands-and-quirks/</guid>
		<description><![CDATA[Things I&#8217;ve learned from my first git experiences. First of all, git is inconsistent as hell. Every command has its own quirks and syntax, so I&#8217;m attempting to catalog some of them here. We&#8217;ve been using git svn at Planypus as a way to maintain local developer branches and still push to our svn as [...]]]></description>
			<content:encoded><![CDATA[<p>Things I&#8217;ve learned from my first git experiences. First of all, git is inconsistent as hell. Every command has its own quirks and syntax, so I&#8217;m attempting to catalog some of them here. We&#8217;ve been using <code>git svn</code> at Planypus as a way to maintain local developer branches and still push to our svn as a central place which then triggers our integration server rebuild, cruise control, and so on.</p>
<p><b>First, make it look nice</b><br />
<code><br />
$ git config --global color.diff auto<br />
$ git config --global color.status auto<br />
$ git config --global color.branch auto<br />
$ git config --global color.interactive auto<br />
</code><br />
via <a href="http://www.tpope.net/rails-git-best-practices">tpope</a></p>
<p><b>Onwards to the commands&#8230;</b></p>
<p>If you&#8217;re using <code>git svn</code> and you want to see changes that you have comitted locally but have not yet <code>dcomitt</code>ed</p>
<p><code>git svn dcommit -n</code></p>
<p>This might give you output that looks like this<br />
<code>diff-tree e784cfa... e784cfa...</code></p>
<p>BUT, if you want to actually see the changes, what you want is apparently the &#8216;patch&#8217; output:</p>
<p><code>git diff-tree -p e784cfa... e784cfa...</code></p>
<p>If you have uncomitted changes, it&#8217;s easy to see them</p>
<p><code>git diff</code></p>
<p>BUT, if you&#8217;ve already created your commit set (<code>git add</code>) but not comitted, you how have to use</p>
<p><code>git diff --cached</code></p>
<p>If you&#8217;ve accidentally added  some files to your commit set and want to remove them from the index (untrack them), but leave the changes in your working tree</p>
<p><code>git reset HEAD [file/dir]</code></p>
<p>To undo local changes (<em>revert</em> in the svn sense)</p>
<p><code>git checkout [files]</code></p>
<p>Note that this works as long as the file is not yet in your index. If you&#8217;re already tracking it for commit, you&#8217;ll need to untrack it first using <code>git reset HEAD [file]</code> before you&#8217;re able to check it out.</p>
<p>You can also use this command to check out files from the past by specifying any commit hash:</p>
<p><code>git checkout [hash] [files]</code></p>
<p>It&#8217;s just that when you don&#8217;t specify the hash, it assumes HEAD.</p>
<p>If you&#8217;ve got changes you want to just throw away permanently, you can just reset:</p>
<p><code>git reset --hard</code></p>
<p>But reset is a powerful command that can also take you back in time. Let&#8217;s say you messed up the last commit, you can take yourself back to the way things were right before you comitted:</p>
<p><code>git reset HEAD^</code></p>
<p>Notice I didn&#8217;t use <code>--hard</code> because that throws away the changes. Instead, this form of the command throws away the commit by taking you to HEAD^ (one commit before HEAD), but it leaves the changes in your working tree. If you want the changes also to be left in your index (ready to be comitted) you can use</p>
<p><code>git reset --soft HEAD^</code></p>
<p>If you&#8217;re working on something and you decide you want to scrap it or work on it later</p>
<p><code>git stash</code></p>
<p>There are lots of fun things you can do with stashes but they&#8217;ve been covered on other blogs.</p>
<p><b>on merging&#8230;</b></p>
<p>If you&#8217;ve done a <code>git merge</code> and have some conflicts, launch <code>git mergetool</code> which will take you through the conflicted files one by one using your default merging tool (FileMerge, usually, on OSX) and let you merge them. However be careful. Either because of a misconfig on my end or some other quirk, FileMerge shows the file I pulled from svn as &#8220;LOCAL&#8221; while my file with changes is &#8220;REMOTE&#8221; which is counterintuitive to me and caused me to fubar a merge the first time I tried.</p>
<p>Take note that after the merge, you will have files ending with <code>.orig</code> left on your system so you&#8217;ll have to manually delete them, unless you have the config <code>mergetool.<tool>.keepBackup</code> set, but I haven&#8217;t tried this yet. Also, after the merge I was getting error messages about having a <code>.git/MERGE_HEAD</code> file, which I couldn&#8217;t find enough docs online for, so I just deleted it..and hopefully that did not fubar me.</p>
<p>Well that&#8217;s all for now. More might come as I learn to stop worrying and love the git.</p>
<p>P.P.S Many of these commands are not necessary if you use <a href="http://gitorious.org/projects/git-tmbundle">The Git Textmate Bundle</a> and <a href="http://github.com/Caged/gitnub/wikis/home">GitNub</a> which integrate together and work very well!</p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2008/04/22/useful-git-commands-and-quirks/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Mail.app: quickfind your reply</title>
		<link>http://yanpritzker.com/2007/08/16/mailapp-quickfind-your-reply/</link>
		<comments>http://yanpritzker.com/2007/08/16/mailapp-quickfind-your-reply/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 02:03:02 +0000</pubDate>
		<dc:creator>yan</dc:creator>
				<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://skwpspace.com/2007/08/16/mailapp-quickfind-your-reply/</guid>
		<description><![CDATA[Maybe I&#8217;m just obtuse but I accidentally discovered this awesome Mail.app feature today only after a year of using it :-). You know the little arrow that indicates that you replied to an email? Well it turns out it&#8217;s not just an indicator&#8230;if you mouse over it, it highlights and clicking on it takes you [...]]]></description>
			<content:encoded><![CDATA[<p><img style='margin-bottom:-3px' src="http://farm2.static.flickr.com/1076/1132053015_077dddc468_m.jpg"/> Maybe I&#8217;m just obtuse but I accidentally discovered this awesome Mail.app feature today only after a year of using it :-). You know the little arrow that indicates that you replied to an email? Well it turns out it&#8217;s not just an indicator&#8230;if you mouse over it, it highlights and clicking on it takes you right to the reply you sent. </p>
]]></content:encoded>
			<wfw:commentRss>http://yanpritzker.com/2007/08/16/mailapp-quickfind-your-reply/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

