<?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>Sentia &#124; Sydney IT Consultancy, Software Development, Ruby on Rails, Web Application Development, Rails Development, Test Driven Development, Microsoft.Net, Asp.Net , Agile, Continuous Integration Training, iPhone development &#187; git</title>
	<atom:link href="http://www.sentia.com.au/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sentia.com.au</link>
	<description>Sentia company website and blog about all things development, Ruby on Rails, Microsoft .Net, ASP.Net, C#.Net, Agile web development, Test Driven Development</description>
	<lastBuildDate>Thu, 02 Feb 2012 07:16:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Restoring a deleted file in GIT</title>
		<link>http://www.sentia.com.au/2011/03/restoring-a-deleted-file-in-git/</link>
		<comments>http://www.sentia.com.au/2011/03/restoring-a-deleted-file-in-git/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 05:51:46 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=847</guid>
		<description><![CDATA[Just because l always forget the exact syntax for restoring &#8230; <a href="http://www.sentia.com.au/2011/03/restoring-a-deleted-file-in-git/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just because l always forget the exact syntax for restoring a deleted file from git</p>
<pre class="brush: bash; title: ; notranslate">
     git checkout &lt;deleting_commit&gt;^ -- &lt;file_path&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2011/03/restoring-a-deleted-file-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git branching after committing</title>
		<link>http://www.sentia.com.au/2010/07/git-branching-after-commiting/</link>
		<comments>http://www.sentia.com.au/2010/07/git-branching-after-commiting/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 09:55:35 +0000</pubDate>
		<dc:creator>James Kong</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=768</guid>
		<description><![CDATA[Let&#8217;s say you make some changes on your master branch &#8230; <a href="http://www.sentia.com.au/2010/07/git-branching-after-commiting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you make some changes on your master branch and commit a few times. So when you do a good old &#8216;git status&#8217; you may have something like this</p>
<pre class="brush: bash; title: ; notranslate">
kongy@Deadpool:~/Development/Sentia/project (master) $ git status
# On branch master
# Your branch is ahead of 'origin/master' by 3 commits.
</pre>
<p>However you now realize you have taken the red pill. You are in the middle of a monster feature, and realise that you should have branched before. Luckily we can fix this using some git magic.</p>
<p>&#8220;Why, oh why, didn&#8217;t I take the blue pill?&#8221;</p>
<p>Let&#8217;s go back 3 commits by checking it out.</p>
<pre class="brush: bash; title: ; notranslate">
kongy@Deadpool:~/Development/Sentia/project (master) $ git checkout HEAD~3
Note: moving to 'HEAD~3' which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b &lt;new_branch_name&gt;
HEAD is now at 978b493... Merge branch 'master' of github.com:Sentia/project
</pre>
<p>Nice! Now our repository is sitting pretty at 3 commits previously. And even better, git also tell us how to create a branch from this point. So let&#8217;s do that now push the newly created branch up to Github.</p>
<pre class="brush: bash; title: ; notranslate">
kongy@Deadpool:~/Development/Sentia/project ((no branch)) $ git checkout -b magic
Switched to a new branch 'tiling'
kongy@Deadpool:~/Development/Sentia/project (magic) $ git push origin magic
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:Sentia/project.git
 * [new branch]      magic -&gt; magic
</pre>
<p>Now that we have created and saved the branch, lets grab all those changes in master, merge them into our branch, and push up to Github</p>
<pre class="brush: bash; title: ; notranslate">
kongy@Deadpool:~/Development/Sentia/project (magic) $ git merge master
Updating 978b493..8a74bd3
Fast forward
 project.rb                 |  443 ++++++++++-----------------------
</pre>
<p>Cool, so our branch is now up to date. Now all we have to do is fix our master branch to become the same as the the GitHub origin master branch. I think there is probably an easier way to do this but I went and got the SHA commit key for the HEAD of origin to know where I wanted to go back to.</p>
<pre class="brush: bash; title: ; notranslate">
kongy@Deadpool:~/Development/Sentia/project (magic) $ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 3 commits.
kongy@Deadpool:~/Development/Sentia/project (master) $ git reset --hard 978b493631a1443b1c84
HEAD is now at 978b493 Merge branch 'master' of github.com:Sentia/project
</pre>
<p>And you&#8217;re done. Now you can work in peace on your branch without disturbing your fellow developers. And then cry when you need to merge their changes into your branch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2010/07/git-branching-after-commiting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a new Rails app with Git</title>
		<link>http://www.sentia.com.au/2009/09/setting-up-a-new-rails-app-with-git/</link>
		<comments>http://www.sentia.com.au/2009/09/setting-up-a-new-rails-app-with-git/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 03:15:40 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[source control]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=479</guid>
		<description><![CDATA[Ok so you want to be cool like all other &#8230; <a href="http://www.sentia.com.au/2009/09/setting-up-a-new-rails-app-with-git/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ok so you want to be cool like all other rails developers out there and use Git for your projects. Here is a quick run down of how you might go about it.</p>
<p>Firstly create your rails app and using terminal go into the root of that project.</p>
<p>Then create a top, project-level .gitignore file. I use textmate so this can be done like so</p>
<pre class="brush: ruby; title: ; notranslate">
$ mate .gitignore
</pre>
<p>Then add the following to the .gitignore file</p>
<pre class="brush: ruby; title: ; notranslate">
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
</pre>
<p>You can also add more directories or files in here to ignore like css files if using sass for example, or your uploads directory.</p>
<p>Create some .gitignore files so the empty directories get tracked:</p>
<pre class="brush: ruby; title: ; notranslate">
$ touch log/.gitignore
$ touch tmp/.gitignore
</pre>
<p>and finally commit that bad boy</p>
<pre class="brush: ruby; title: ; notranslate">
$ git add .
$ git commit -m &quot;First commit&quot;
</pre>
<p>Running git add will tell git to track all the new files (Since first commit thats all of them). The commit will commit to your local Git repository and all that is left to do would be to add it to GitHub for example and your in business.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/09/setting-up-a-new-rails-app-with-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cool colours and GitHub branch in Terminal</title>
		<link>http://www.sentia.com.au/2009/06/cool-colours-and-github-branch-in-terminal/</link>
		<comments>http://www.sentia.com.au/2009/06/cool-colours-and-github-branch-in-terminal/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 01:17:18 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mac osx]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=285</guid>
		<description><![CDATA[There are many posts out there about making terminal have &#8230; <a href="http://www.sentia.com.au/2009/06/cool-colours-and-github-branch-in-terminal/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are many posts out there about making terminal have nice colours and getting it to display your projects GitHub branch. So l thought l would post mine</p>
<p>Here is what my terminal looks like.</p>
<p><img src="http://sentia.com.au/wp-content/uploads/2009/06/picture-4.png" alt="picture 4 Cool colours and GitHub branch in Terminal" title="my terminal" width="438" height="73" class="alignnone size-full wp-image-286" /></p>
<p>Yes l am using Ryan Bates railscasts as my sample project (Thanks Ryan). As you can see it has the username@machine and then if you are in a project running git is also has the branch.</p>
<p>All you need to do it add the following to either your bash_login or bash_profile depending on what you are using. So first you run</p>
<pre class="brush: ruby; title: ; notranslate">
   mate ~/.bash_login
</pre>
<p>I am using textmate to edit this file. Once there simple add the following</p>
<pre class="brush: ruby; title: ; notranslate">
export CLICOLOR=1
export TERM=xterm-color
export LSCOLORS=gxfxcxdxbxegedabagacad  # cyan directories
export PS1=&quot;\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ \`ruby -e \&quot;print (%x{git branch 2&gt; /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\&quot;\`\[\033[37m\]$\[\033[00m\] &quot;
</pre>
<p>Save the file and reload your bash like so and you are good to go enjoy.</p>
<pre class="brush: ruby; title: ; notranslate">
  . ~/.bash_login
</pre>
<p>Of course you can change the colour of the font but ill leave that to you</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/06/cool-colours-and-github-branch-in-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sentia rails application templates now on GitHub</title>
		<link>http://www.sentia.com.au/2009/05/sentia-rails-application-templates-now-on-github/</link>
		<comments>http://www.sentia.com.au/2009/05/sentia-rails-application-templates-now-on-github/#comments</comments>
		<pubDate>Wed, 13 May 2009 06:19:28 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[application templates]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=255</guid>
		<description><![CDATA[We have just made a project on github to store &#8230; <a href="http://www.sentia.com.au/2009/05/sentia-rails-application-templates-now-on-github/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We have just made a project on github to store our rails application templates that we talked about <a href="http://sentia.com.au/2009/05/application-templates-in-ruby-on-rails/">here</a>. You can check it out <a href="http://github.com/Sentia/Sentia-Rails-Application-Templates/tree/master">here</a>. Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/05/sentia-rails-application-templates-now-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Application templates in Ruby on Rails</title>
		<link>http://www.sentia.com.au/2009/05/application-templates-in-ruby-on-rails/</link>
		<comments>http://www.sentia.com.au/2009/05/application-templates-in-ruby-on-rails/#comments</comments>
		<pubDate>Fri, 08 May 2009 05:59:24 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[application templates]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=218</guid>
		<description><![CDATA[Here is the latest application template we have put together. &#8230; <a href="http://www.sentia.com.au/2009/05/application-templates-in-ruby-on-rails/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is the latest application template we have put together. It removes all the usual items and adds the base gems that we use for all our applications. It also creates the files needed for deployment and runs &#8220;Capify&#8221; on the project, plus a few other things such as sass etc.</p>
<pre class="brush: ruby; title: ; notranslate">
# Remove unnecessary Rails files
run 'rm README'
run 'rm public/index.html'
run 'rm public/favicon.ico'
run 'rm public/images/rails.png'
run 'rm -f public/javascripts/*'

# Download JQuery
run &quot;curl -s -L http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js &gt; public/javascripts/jquery.js&quot;
run &quot;curl -s -L http://jqueryjs.googlecode.com/svn/trunk/plugins/form/jquery.form.js &gt; public/javascripts/jquery.form.js&quot;

#Configure required gems
gem &quot;haml&quot;, :version =&gt; &quot;2.0.4&quot;
gem 'thoughtbot-shoulda', :lib =&gt; 'shoulda', :source =&gt; 'http://gems.github.com'
gem &quot;thoughtbot-factory_girl&quot;, :lib =&gt; &quot;factory_girl&quot;, :source =&gt; &quot;http://gems.github.com&quot;

#Create Sass directory
run 'mkdir public/stylesheets/sass'

#Capify and create production environment.rb
run 'mkdir config/deploy'
run 'touch config/deploy/production.rb'

#Add UAT environment and settings
file 'config/environments/uat.rb', &lt;&lt;-CODE
# Settings specified here will take precedence over those in config/environment.rb

# Code is not reloaded between requests. Server needs to be restarted.
config.cache_classes = true

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true

# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching             = true
config.action_view.cache_template_loading            = true

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
CODE

#Create gitignore file and setup base ignores
run &quot;touch tmp/.gitignore log/.gitignore vendor/.gitignore&quot;
file '.gitignore', &lt;&lt;-FILE
.DS_Store
log/*.log
tmp/**/*
db/*.sqlite3
public/stylesheets/*.css
FILE

# Set up git repository
git :init
git :add =&gt; '.'
git :commit =&gt; &quot;-a -m 'Initial commit'&quot;

# Success!
puts &quot;SUCCESS!&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/05/application-templates-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

