<?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>NiceCabbage Blog &#187; git</title>
	<atom:link href="http://www.nicecabbage.com/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nicecabbage.com</link>
	<description>Life, Design, Web Application</description>
	<lastBuildDate>Mon, 07 Jun 2010 02:03:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>share repositories in windows with osx using &#8220;git push&#8221;</title>
		<link>http://www.nicecabbage.com/2009/06/share_repos_win_and_osx_using_git_push/</link>
		<comments>http://www.nicecabbage.com/2009/06/share_repos_win_and_osx_using_git_push/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 08:08:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Turoial]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=96</guid>
		<description><![CDATA[Problem

You have a git repos in Windows XP, and you want to share that with your MacOSX machine. The easiest way seems git clone in MacOSX. However, my win repos are in D drive and I did not find out how to write the repos path. I did


git clone tomoya@windows:d:\home\git.git


git clone tomoya@windows:d:\\home\\git.git


git clone tomoya@windows:d:/home/git.git


git clone [...]]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>
You have a git repos in Windows XP, and you want to share that with your MacOSX machine. The easiest way seems <strong>git clone</strong> in MacOSX. However, my win repos are in D drive and I did not find out how to write the repos path. I did
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git clone tomoya<span style="color: #000000; font-weight: bold;">@</span>windows:d:\home\git.git</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git clone tomoya<span style="color: #000000; font-weight: bold;">@</span>windows:d:\\home\\git.git</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git clone tomoya<span style="color: #000000; font-weight: bold;">@</span>windows:d:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>git.git</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git clone tomoya<span style="color: #000000; font-weight: bold;">@</span>windows:<span style="color: #ff0000;">&quot;d:/home/git.git&quot;</span></pre></div></div>

<p>but all failed in vain. </p>
<p>
Thus, I changed my mind to use <strong>git push</strong> from Windows.
</p>
<h2>Solution</h2>
<h3>SSH server on Windows</h3>
<p>
First, if you have not installed cygwin, or any SSH server for Windows, install <a href="http://www.freesshd.com/index.php">freeSSHd</a>. This programs runs on Windows as a SSH server.
</p>
<h3>create repository in MacOSX</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>MacOSX<span style="color: #7a0874; font-weight: bold;">&#93;</span>
tomoya<span style="color: #000000; font-weight: bold;">@</span>macosx<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>Workspace<span style="color: #000000; font-weight: bold;">/</span>git
tomoya<span style="color: #000000; font-weight: bold;">@</span>macosx<span style="color: #000000; font-weight: bold;">%</span> git init</pre></div></div>

<h3>Add remote repository</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Windows<span style="color: #7a0874; font-weight: bold;">&#93;</span>
D:\home\git<span style="color: #000000; font-weight: bold;">&gt;</span> git remote add origin tomoya<span style="color: #000000; font-weight: bold;">@</span>macosx:<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>tomoya<span style="color: #000000; font-weight: bold;">/</span>Workspace<span style="color: #000000; font-weight: bold;">/</span>git</pre></div></div>

<h3>Try connectiing to remote</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Windows<span style="color: #7a0874; font-weight: bold;">&#93;</span>
D:\home\git<span style="color: #000000; font-weight: bold;">&gt;</span> git remote show origin</pre></div></div>

<p>Then I got a error as</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly</pre></div></div>

<p>
This is because my MacOSX requires key authentication. So, I specified pub.key files just by creating config file in %HOME%/.ssh/.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Windows<span style="color: #7a0874; font-weight: bold;">&#93;</span>
D:\home\git<span style="color: #000000; font-weight: bold;">&gt;</span> notepad <span style="color: #ff0000;">&quot;%HOME%\.ssh\config&quot;</span></pre></div></div>

<p>and, type</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Host 192.168.1.21
  User tomoya
  Port 22
  Hostname 192.168.1.21
  IdentityFile C:/id_rsa
  TCPKeepAlive yes
  IdentitiesOnly yes</pre></div></div>

<p>Try connecting again.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Windows<span style="color: #7a0874; font-weight: bold;">&#93;</span>
D:\home\git<span style="color: #000000; font-weight: bold;">&gt;</span> git remote show origin
<span style="color: #c20cb9; font-weight: bold;">zsh</span>: <span style="color: #7a0874; font-weight: bold;">command</span> not found: git-upload-pack
fatal: The remote end hung up unexpectedly</pre></div></div>

<p>
Great. I had these errors because my default login shell on MacOSX is zsh and my zsh does not know where <strong>git-upload-pack</strong> command is. Check whether git-upload-pack is installed correctly.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>MacOSX<span style="color: #7a0874; font-weight: bold;">&#93;</span>
tomoya<span style="color: #000000; font-weight: bold;">@</span>macosx<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">which</span> git-upload-pack
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>git-upload-pack</pre></div></div>

<p>
OK. Now check if i have .zshenv file in your home directory.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>MacOSX<span style="color: #7a0874; font-weight: bold;">&#93;</span>
tomoya<span style="color: #000000; font-weight: bold;">@</span>macosx<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> ~<span style="color: #000000; font-weight: bold;">/</span>.zshenv
<span style="color: #c20cb9; font-weight: bold;">cat</span>: <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>tomoya<span style="color: #000000; font-weight: bold;">/</span>.zshenv: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory</pre></div></div>

<p>I do not. So I made a symbolic link to .zshenv.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>MacOSX<span style="color: #7a0874; font-weight: bold;">&#93;</span>
tomoya<span style="color: #000000; font-weight: bold;">@</span>macosx<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> ~<span style="color: #000000; font-weight: bold;">/</span>.zshrc ~<span style="color: #000000; font-weight: bold;">/</span>.zshenv</pre></div></div>

<p>
More detailed infomation about .zshrc and .zshenv can be found at <a href="http://zsh.dotsrc.org/Intro/intro_3.html">here: http://zsh.dotsrc.org/Intro/intro_3.html</a>. <br />
Try connecting fot the third time.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Windows<span style="color: #7a0874; font-weight: bold;">&#93;</span>
D:\home\git<span style="color: #000000; font-weight: bold;">&gt;</span> git remote show origin
<span style="color: #000000; font-weight: bold;">*</span> remote origin
  URL: tomoya<span style="color: #000000; font-weight: bold;">@</span>192.168.1.21:<span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>tomoya<span style="color: #000000; font-weight: bold;">/</span>Workspace<span style="color: #000000; font-weight: bold;">/</span>git
  HEAD branch: master
  Remote branch:
    master tracked
  Local ref configured <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #ff0000;">'git push'</span>:
    master pushes to master <span style="color: #7a0874; font-weight: bold;">&#40;</span>up to <span style="color: #c20cb9; font-weight: bold;">date</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Hoora! We made it. Ok, move on to next task.</p>
<h3>Push to OSX</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Windows<span style="color: #7a0874; font-weight: bold;">&#93;</span>
D:\home\git<span style="color: #000000; font-weight: bold;">&gt;</span> git push origin master</pre></div></div>

</p>
<p>And on MacOSX,</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>MacOSX<span style="color: #7a0874; font-weight: bold;">&#93;</span>
tomoya<span style="color: #000000; font-weight: bold;">@</span>macosx<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">ls</span> ~<span style="color: #000000; font-weight: bold;">/</span>Workspace<span style="color: #000000; font-weight: bold;">/</span>git</pre></div></div>

<p>If you see no files in this directory, this is because pushed files are deleted temporarily, so revert all the files as</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>MacOSX<span style="color: #7a0874; font-weight: bold;">&#93;</span>
tomoya<span style="color: #000000; font-weight: bold;">@</span>macosx<span style="color: #000000; font-weight: bold;">%</span> git reset <span style="color: #660033;">--hard</span> HEAD</pre></div></div>

<p>
That&#8217;s all. Now you have the second repos in your Mac OSX.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/06/share_repos_win_and_osx_using_git_push/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gisty for gist and gisty for Ruby1.9.1</title>
		<link>http://www.nicecabbage.com/2009/06/gisty-for-gist-and-gisty-for-ruby1-9-1/</link>
		<comments>http://www.nicecabbage.com/2009/06/gisty-for-gist-and-gisty-for-ruby1-9-1/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 07:30:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=76</guid>
		<description><![CDATA[Introduction

gist is a simple web service by github for posting and sharing your cool code snippets. gisty is a command-line client for gist.

Installation of gisty

sudo gem install nokogiri
sudo gem sources -a http://gems.github.com
sudo gem install swdyh-gisty

Usage

 Posting a source code is as easy as


 gisty post hello.c world.c


 Also, you can &#8216;clone&#8217; all your code snippets.


 [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>
<a href='http://gist.github.com'>gist</a> is a simple web service by github for posting and sharing your cool code snippets. <a href="">gisty</a> is a command-line client for gist.
</p>
<h2>Installation of gisty</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> nokogiri
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem sources <span style="color: #660033;">-a</span> http:<span style="color: #000000; font-weight: bold;">//</span>gems.github.com
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> swdyh-gisty</pre></div></div>

<h2>Usage</h2>
<p>
 Posting a source code is as easy as
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> gisty post hello.c world.c</pre></div></div>

<p>
 Also, you can &#8216;clone&#8217; all your code snippets.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> gisty <span style="color: #c20cb9; font-weight: bold;">sync</span></pre></div></div>

<p>
For more information, type
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> gisty <span style="color: #7a0874; font-weight: bold;">help</span></pre></div></div>

<p><br/><br />
<br/><br />
And the problem is&#8230;</p>
<h2>Problem</h2>
<p>
gisty does not work with Ruby1.9.1.
</p>
<h2>Solution</h2>
<p>
I made a forked version of gisty on <a href=''http://github.com/tomoya55/gisty/tree/master">github repos</a>. Soon, you will be able to download this version
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> tomoya55-gisty</pre></div></div>

<p>
Notice: you cannot install tomoya55-gisty at this moment. I am now investigating what is going on on my gems. Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/06/gisty-for-gist-and-gisty-for-ruby1-9-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
