<?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>Sean&#039;s Blog &#187; Git</title>
	<atom:link href="http://seanbehan.com/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Recover a Mistakenly Deleted Branch</title>
		<link>http://seanbehan.com/git/how-to-recover-a-mistakenly-deleted-branch/</link>
		<comments>http://seanbehan.com/git/how-to-recover-a-mistakenly-deleted-branch/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 17:49:11 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[branching]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[mistakes]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[reflog]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1420</guid>
		<description><![CDATA[Workflow git checkout -b _new_branch_name # do some work and commit changed git checkout master git branch -d _new_branch_name # doh... i meant to merge first Fortunately, you can easily recover from this mistake. git reflog 395b1ea HEAD@{0}: checkout: moving from _master_cleanup_akismet to _master_cleanup bd7df04 HEAD@{1}: commit: spam handling using akismet for form submissions on [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fhow-to-recover-a-mistakenly-deleted-branch%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="How to Recover a Mistakenly Deleted Branch" data-url="http://seanbehan.com/git/how-to-recover-a-mistakenly-deleted-branch/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Workflow<br />
<code><br />
git checkout -b _new_branch_name<br />
# do some work and commit changed<br />
git checkout master<br />
git branch -d _new_branch_name<br />
# doh... i meant to merge first<br />
</code></p>
<p>Fortunately, you can easily recover from this mistake.</p>
<pre class="wp-code-highlight prettyprint">
git reflog
395b1ea HEAD@{0}: checkout: moving from _master_cleanup_akismet to _master_cleanup
bd7df04 HEAD@{1}: commit: spam handling using akismet for form submissions on contact_submission and applicant models
395b1ea HEAD@{2}: checkout: moving from _master_cleanup to _master_cleanup_akismet
395b1ea HEAD@{3}: commit: cleaning up and adding some basic features
a828ef3 HEAD@{4}: checkout: moving from master to _master_cleanup
</pre>
<p>Should show you a list of commits across all branches in desc chronological order.</p>
<p>To merge the branch you just deleted you can give merge the sha.</p>
<pre class="wp-code-highlight prettyprint">
git merge bd7df04
</pre>
<p>Which would match the commit at  HEAD@{1}</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/how-to-recover-a-mistakenly-deleted-branch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Feature Branch Naming Strategy</title>
		<link>http://seanbehan.com/git/git-feature-branch-naming-strategy/</link>
		<comments>http://seanbehan.com/git/git-feature-branch-naming-strategy/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 20:39:31 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[branching]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[naming things]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1402</guid>
		<description><![CDATA[There are only two hard things in Computer Science: cache invalidation and naming things. &#8211; Phil Karlton Typically, we have three main branches at any given time in a project lifecycle. master, development and staging. Master is production ready code, development is actively being worked on and staging is pre-flight testing before deploying master. Features [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fgit-feature-branch-naming-strategy%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Git Feature Branch Naming Strategy" data-url="http://seanbehan.com/git/git-feature-branch-naming-strategy/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><blockquote><p>There are only two hard things in Computer Science: cache invalidation and naming things.<br />
&#8211; Phil Karlton</p></blockquote>
<p>Typically, we have three main branches at any given time in a project lifecycle.</p>
<pre class="wp-code-highlight prettyprint">master, development and staging.</pre>
<p>Master is production ready code, development is actively being worked on and staging is pre-flight testing before deploying master.</p>
<p>Features are branched off of development and use underscores to indicate distance from originating branch. For instance</p>
<pre class="wp-code-highlight prettyprint">
_development_users
__development_users_reset_password
</pre>
<p>indicates that __development_users_reset_password branched off of _development_users branch. </p>
<pre class="wp-code-highlight prettyprint">___development_users_reset_password_experiment</pre>
<p> (3 underscores away) would indicate that I was experimenting with a branch off of development users reset password branch. </p>
<p>This provides a nice visual hierarchy when running git branch from the command line. It&#8217;s also helpful when you have multiple features being worked on by several people and you want to know where these branches are in relation to each other without needing to ask anyone. Here is a more complex example that illustrates the usefulness in using underscores in naming feature branches</p>
<pre class="wp-code-highlight prettyprint">
  __development_people_importing_csv
* __development_people_importing_xml
  __development_users_password_reset
  _development_people_importing
  _development_users
  development
  master
  staging
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/git-feature-branch-naming-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Untrack Already Tracked Files</title>
		<link>http://seanbehan.com/git/git-untrack-already-tracked-files/</link>
		<comments>http://seanbehan.com/git/git-untrack-already-tracked-files/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 13:27:44 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gitignore]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[rm]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1360</guid>
		<description><![CDATA[To remove files that are currently being tracked by git, you have to remove them from the &#8220;cache&#8221;. Note, doing this will NOT delete the file on your local machine. It will still be there but not be tracked. git rm -r --cached supersecretpasswords.txt You then need to add the file to the .gitignore file [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fgit-untrack-already-tracked-files%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Git Untrack Already Tracked Files" data-url="http://seanbehan.com/git/git-untrack-already-tracked-files/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>To remove files that are currently being tracked by git, you have to remove them from the &#8220;cache&#8221;. Note, doing this will NOT delete the file on your local machine. It will still be there but not be tracked.</p>
<pre class="wp-code-highlight prettyprint"> git rm -r --cached supersecretpasswords.txt </pre>
<p>You then need to add the file to the .gitignore file in the root of the project so that it isn&#8217;t tracked again on your next commit. </p>
<pre class="wp-code-highlight prettyprint">

vim .gitignore
supersecretpasswords.txt
</pre>
<p>.gitignore files are tracked so remember to check in these changes.</p>
<pre class="wp-code-highlight prettyprint">
git commit -am'my super secret passwords are safe!'
</pre>
<p>If you want to completely delete the file, on your local machine and from git</p>
<pre class="wp-code-highlight prettyprint">
git rm supersecretpasswords.txt
</pre>
<p>If you&#8217;re working with a directory remember to add the -r flag for recursive removal!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/git-untrack-already-tracked-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git: How to Delete a Branch with an Invalid Name</title>
		<link>http://seanbehan.com/git/git-how-to-delete-a-branch-with-an-invalid-name/</link>
		<comments>http://seanbehan.com/git/git-how-to-delete-a-branch-with-an-invalid-name/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 12:39:50 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[branching]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[invalid]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1349</guid>
		<description><![CDATA[If you&#8217;ve named a branch beginning with two dashes &#8220;&#8211;&#8221;, you&#8217;re sort of in trouble because git interprets your branch name as a switch/flag. You can skip switches all together by supplying two dashes before your branch name git branch -d -- --index_for_suppliers and your branch will be deleted!]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fgit-how-to-delete-a-branch-with-an-invalid-name%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Git: How to Delete a Branch with an Invalid Name" data-url="http://seanbehan.com/git/git-how-to-delete-a-branch-with-an-invalid-name/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>If you&#8217;ve named a branch beginning with two dashes &#8220;&#8211;&#8221;, you&#8217;re sort of in trouble because git interprets your branch name as a switch/flag. You can skip switches all together<br />
by supplying two dashes before your branch name</p>
<pre class="wp-code-highlight prettyprint">git branch -d -- --index_for_suppliers</pre>
<p>and your branch will be deleted!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/git-how-to-delete-a-branch-with-an-invalid-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Remove Your Last Git Commit</title>
		<link>http://seanbehan.com/git/remove-your-last-git-commit/</link>
		<comments>http://seanbehan.com/git/remove-your-last-git-commit/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 12:37:13 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[hard]]></category>
		<category><![CDATA[head]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1240</guid>
		<description><![CDATA[Remove your last commit (if you haven&#8217;t pushed yet) git reset --hard HEAD~1 To see changes that have been committed and their position in HEAD git reflog And to undo your previous reset and advance the cursor to the reference immediately behind the current state git reset --hard HEAD@{1} If you have already pushed you [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fremove-your-last-git-commit%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="How to Remove Your Last Git Commit" data-url="http://seanbehan.com/git/remove-your-last-git-commit/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Remove your last commit (if you haven&#8217;t pushed yet)</p>
<pre class="wp-code-highlight prettyprint">git reset --hard HEAD~1</pre>
<p>To see changes that have been committed and their position in HEAD</p>
<pre class="wp-code-highlight prettyprint">git reflog </pre>
<p>And to undo your previous reset and advance the cursor to the reference immediately behind the current state</p>
<pre class="wp-code-highlight prettyprint">git reset --hard HEAD@{1}</pre>
<p>If you have already pushed you can</p>
<pre class="wp-code-highlight prettyprint">git revert HEAD</pre>
<p>which will reverse your last commit by creating a new commit </p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/remove-your-last-git-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Ruby on Rails 3, MySQL, Git, Ruby Enterprise Edition, Passenger (Mod_Rails) on Ubuntu with Rackspace Cloud.</title>
		<link>http://seanbehan.com/ruby-on-rails/installing-ruby-on-rails-3-mysql-git-ruby-enterprise-edition-passenger-mod_rails-on-ubuntu-with-rackspace-cloud/</link>
		<comments>http://seanbehan.com/ruby-on-rails/installing-ruby-on-rails-3-mysql-git-ruby-enterprise-edition-passenger-mod_rails-on-ubuntu-with-rackspace-cloud/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 19:12:46 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby enterprise edition]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1269</guid>
		<description><![CDATA[Short and sweet. Here all the commands I run in this order to set up a brand new box. It usually takes about 10 &#8211; 15 minutes on a 256 MB RAM instance. Compiling Ruby Enterprise Edition, which is super easy, will take the most amount of time. It will seem to have gotten stuck. [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fruby-on-rails%2Finstalling-ruby-on-rails-3-mysql-git-ruby-enterprise-edition-passenger-mod_rails-on-ubuntu-with-rackspace-cloud%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Installing Ruby on Rails 3, MySQL, Git, Ruby Enterprise Edition, Passenger (Mod_Rails) on Ubuntu with Rackspace Cloud." data-url="http://seanbehan.com/ruby-on-rails/installing-ruby-on-rails-3-mysql-git-ruby-enterprise-edition-passenger-mod_rails-on-ubuntu-with-rackspace-cloud/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Short and sweet. Here all the commands I run in this order to set up a brand new box. It usually takes about 10 &#8211; 15 minutes on a 256 MB RAM instance. Compiling Ruby Enterprise Edition, which is super easy, will take the most amount of time. It will seem to have gotten stuck. It hasn&#8217;t. It just takes a little while. </p>
<pre class="wp-code-highlight prettyprint">
# Update, upgrade and install all necessary packages for Ruby on Rails server if you've got a fresh Ubuntu slice
apt-get update
apt-get upgrade

apt-get install build-essential patch libssl-dev libreadline5-dev

apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby imagemagick librmagick-ruby1.8 librmagick-ruby-doc libfreetype6-dev xml-core postfix
# postfix will prompt you for details
# use Internet Site and enter in the domain name you are planning on sending email from 

apt-get install apache2 apache2-prefork-dev libapr1-dev libaprutil1-dev libcurl4-openssl-dev git-core mysql-server mysql-client libmysqlclient15-dev libmysql-ruby
# mysql will also prompt you to set up a root user account. set the password to be anything you like

# next, download the latest release of ruby enterprise edition but when you're installing it on your own machine version numbers and release dates may have changed.
# pay attention to the version and release date before the file extension. it will be something like
# ... 1.8.7-2010.02
# this will change to something like 2011.03, 2011.04... etc in the future.
# just double check the paths on when you are installing and make the necessary substitutions

# ruby enterprise edition is available at http://www.rubyenterpriseedition.com/download.html
wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
tar xzvf ruby-enterprise-1.8.7-2010.02.tar.gz 

./ruby-enterprise-1.8.7-2010.02/installer
# this may take a little while (just follow the instructions)
# and hit enter to install in default location (recommended) when prompted 

# and to install passenger (which is mod_rails for apache)
/opt/ruby-enterprise-1.8.7-2010.02/bin/passenger-install-apache2-module 

# i take the output from the above script and add it to my available modules directory
vim /etc/apache2/mods-available/passenger.conf

# and enter something like this in the newly created file (your version numbers will prob. be different)
LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-3.0.2
PassengerRuby /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby

# and then sym link it to the enabled directory so that apache knows about it
ln -s /etc/apache2/mods-available/passenger.conf /etc/apache2/mods-enabled/passenger.conf

# and now i want to include ruby enterprise edition in my path so i add it to my profile (again make sure the path is correct)
vim /etc/profile.d/passenger.sh
export PATH=/opt/ruby-enterprise-1.8.7-2010.02/bin:$PATH

. /etc/profile.d/passenger.sh
# the &quot;.&quot; file will make the setting available for the current terminal session
rails -v
ruby -v
rake -v
# should all be working now
# and
which ruby
# should point to the ruby enterprise edition under /opt

# next i
# set up public/private keys
# so i can do
# ssh localhost without using a password
cd
test -e ~/.ssh/id_dsa.pub || ssh-keygen -t dsa
cat ~/.ssh/id_dsa.pub &gt;&gt; ~/.ssh/authorized_keys2

# and finally install git
apt-get install git-core
</pre>
<p>You should now have a server ready to server ruby on rails applications!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/ruby-on-rails/installing-ruby-on-rails-3-mysql-git-ruby-enterprise-edition-passenger-mod_rails-on-ubuntu-with-rackspace-cloud/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Have Git Email Committers After Pushes</title>
		<link>http://seanbehan.com/git/have-git-email-committers-after-pushes/</link>
		<comments>http://seanbehan.com/git/have-git-email-committers-after-pushes/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 22:50:05 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[email]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[/etc/hosts]]></category>
		<category><![CDATA[committer]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[push]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1198</guid>
		<description><![CDATA[You need a Mail Transfer Agent MTA on the server. The easiest way is to install Sendmail, which Git uses by default. apt-get install sendmail Remember that /etc/hosts file needs the ip address to map to the domain name your sending mail from # vim /etc/hosts 127.0.0.1 localhost localhost.localdomain 207.136.202.87 wwwexample.com Sendmail has a tendency [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fhave-git-email-committers-after-pushes%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Have Git Email Committers After Pushes" data-url="http://seanbehan.com/git/have-git-email-committers-after-pushes/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>You need a Mail Transfer Agent MTA on the server. The easiest way is to install Sendmail, which Git uses by default. </p>
<pre class="wp-code-highlight prettyprint">
apt-get install sendmail
</pre>
<p>Remember that /etc/hosts file needs the ip address to map to the domain name your sending mail from</p>
<pre class="wp-code-highlight prettyprint">
# vim /etc/hosts
127.0.0.1     localhost localhost.localdomain
207.136.202.87    wwwexample.com
 </pre>
<p>Sendmail has a tendency to hang when sending mail otherwise. To test sendmail </p>
<pre class="wp-code-highlight prettyprint">
sendmail email@example.com
this is a test
how are you today world?
.
</pre>
<p>The period on a line by itself denotes end of message and will terminate the prompt and deliver the message. </p>
<p>Now you need to configure Git to send email after it receives a &#8220;push&#8221; from a committer. You can add email addresses, or you can set up a mailing list to email all members. Either way, you accomplish this with the following command, just remember to cd into the git repository.  </p>
<pre class="wp-code-highlight prettyprint">
git config --add hooks.mailinglist &quot;mailinglist@example.com&quot;
</pre>
<p>Next you need to activate the post-receive hook, located in the hooks directory of your repository. </p>
<pre class="wp-code-highlight prettyprint">
cp post-receive.sample post-receive
</pre>
<p>And uncomment the last line, which uses sendmail to deliver the commit message</p>
<pre class="wp-code-highlight prettyprint">
# uncomment the last line but keep the period &quot;.&quot;
. /usr/share/doc/git-core/contrib/hooks/post-receive-email
</pre>
<p>All done. Now just make some changes to your source code, add and commit them and you should receive an email with all the details!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/have-git-email-committers-after-pushes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Very Basic Git Workflow</title>
		<link>http://seanbehan.com/programming/very-basic-git-workflow/</link>
		<comments>http://seanbehan.com/programming/very-basic-git-workflow/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 21:57:52 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[checkout]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=899</guid>
		<description><![CDATA[Very, very basic git workflow git pull git branch dev_branch git checkout dev_branch #make some changes git checkout master git merge dev_branch git branch -d branch_to_delete git push]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fprogramming%2Fvery-basic-git-workflow%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Very Basic Git Workflow" data-url="http://seanbehan.com/programming/very-basic-git-workflow/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Very, very basic git workflow</p>
<pre class="wp-code-highlight prettyprint">
git pull
git branch dev_branch
git checkout dev_branch
#make some changes
git checkout master
git merge dev_branch
git branch -d branch_to_delete
git push
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/programming/very-basic-git-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Branches in Git</title>
		<link>http://seanbehan.com/git/working-with-branches-in-git/</link>
		<comments>http://seanbehan.com/git/working-with-branches-in-git/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 21:43:14 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[source control]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=591</guid>
		<description><![CDATA[Show all the branches git branch Create a new branch git branch my_experimental_feature Use that branch git checkout my_experimental_feature Pushing the new branch to a remote server git push origin my_experimental_feature Pulling that branch down on another machine git pull origin my_experimental_feature Listing all branches on other machine git branch -a Updating other machine git [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fworking-with-branches-in-git%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Working with Branches in Git" data-url="http://seanbehan.com/git/working-with-branches-in-git/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Show all the branches</p>
<pre class="wp-code-highlight prettyprint">
git branch
</pre>
<p>Create a new branch</p>
<pre class="wp-code-highlight prettyprint">
git branch my_experimental_feature
</pre>
<p>Use that branch</p>
<pre class="wp-code-highlight prettyprint">
git checkout my_experimental_feature
</pre>
<p>Pushing the new branch to a remote server</p>
<pre class="wp-code-highlight prettyprint">
git push origin my_experimental_feature
</pre>
<p>Pulling that branch down on another machine</p>
<pre class="wp-code-highlight prettyprint">
git pull origin my_experimental_feature
</pre>
<p>Listing all branches on other machine</p>
<pre class="wp-code-highlight prettyprint">
git branch -a
</pre>
<p>Updating other machine</p>
<pre class="wp-code-highlight prettyprint">
git pull origin my_experimental_feature
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/working-with-branches-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non Standard Port Number with SSH and Git</title>
		<link>http://seanbehan.com/git/non-standard-port-number-with-ssh-and-git/</link>
		<comments>http://seanbehan.com/git/non-standard-port-number-with-ssh-and-git/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 19:25:27 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=529</guid>
		<description><![CDATA[Here is an example using the port 4567 to connect with over ssh and git ssh remote add origin ssh://sean@seanbehan.com:4567/path/to/git git push origin master]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fgit%2Fnon-standard-port-number-with-ssh-and-git%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Non Standard Port Number with SSH and Git" data-url="http://seanbehan.com/git/non-standard-port-number-with-ssh-and-git/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Here is an example using the port 4567 to connect with over ssh and git</p>
<pre class="wp-code-highlight prettyprint">
ssh remote add origin ssh://sean@seanbehan.com:4567/path/to/git
git push origin master
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/git/non-standard-port-number-with-ssh-and-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

