<?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; source control</title>
	<atom:link href="http://seanbehan.com/tag/source-control/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>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>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>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>git checkout &#8212; file-in-question.oh-my</title>
		<link>http://seanbehan.com/programming/git-checkout-file-in-questionoh-my/</link>
		<comments>http://seanbehan.com/programming/git-checkout-file-in-questionoh-my/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 15:43:43 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[source control]]></category>

		<guid isPermaLink="false">http://bseanvt.wordpress.com/?p=45</guid>
		<description><![CDATA[Problem: using git and one file, like your db/schema.rb, is out of whack with the latest branch. If you run git pull and you get a failed merge and no update. You can of course, edit the conflicts manually. But what if you&#8217;re confident that the latest schema.rb is correct? Instead of manually editing the [...]]]></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%2Fgit-checkout-file-in-questionoh-my%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 checkout &#8212; file-in-question.oh-my" data-url="http://seanbehan.com/programming/git-checkout-file-in-questionoh-my/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Problem: using git and one file, like your db/schema.rb, is out of whack with the latest branch. If you run git pull and you get a failed merge and no update. You can of course, edit the conflicts manually. But what if you&#8217;re confident that the latest schema.rb is correct? Instead of manually editing the file and doing all that work, you can grab the latest copy with the git checkout command.</p>
<p>Solution:  git checkout &#8212; &lt;file&gt;<br />
&#8230; or for the Rails application example above&#8230;<br />
git checkout &#8212; db/schema.rb</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/programming/git-checkout-file-in-questionoh-my/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the simple things with git</title>
		<link>http://seanbehan.com/programming/the-simple-things-with-git/</link>
		<comments>http://seanbehan.com/programming/the-simple-things-with-git/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 17:35:27 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[source control]]></category>

		<guid isPermaLink="false">http://bseanvt.wordpress.com/?p=33</guid>
		<description><![CDATA[Git can track the file permissions on your source. This can be good, but for small projects on a webserver where permissions change from time to time, and permissions on development app don&#8217;t match or matter anyway, it&#8217;s often easier to just skip this check alltogether. For the application in question look in the .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%2Fprogramming%2Fthe-simple-things-with-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="the simple things with git" data-url="http://seanbehan.com/programming/the-simple-things-with-git/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Git can track the file permissions on your source. This can be good, but for small projects on a webserver where permissions change from time to time, and permissions on development app don&#8217;t match or matter anyway, it&#8217;s often easier to just skip this check alltogether. For the application in question look in the .git directory in the application root. You&#8217;ll see a config file with the application specific directives. Open the file with your editor of choice and change the filemode to false. It&#8217;s set to true by default.</p>
<p>[core]<br />
repositoryformatversion = 0<br />
filemode = false</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/programming/the-simple-things-with-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

