<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Robert Haas: git</title><description>Sr. Staff Software Engineer @ Databricks, PostgreSQL Developer and Committer</description><link>https://rhaas.dev/</link><item><title>The Git Workflow</title><link>https://rhaas.dev/blog/2012/03/git-workflow/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-1626121691093968377</guid><description>&lt;p&gt;When the &lt;a href=&quot;http://www.postgresql.org/&quot;&gt;PostgreSQL&lt;/a&gt; project decided to migrate to &lt;a href=&quot;http://git-scm.com/&quot;&gt;git&lt;/a&gt;, we decided not to allow merge commits. A number of people made comments, in a number of different fora, to the effect that we weren’t following “the git workflow”. While a few commentators seemed to think that was reasonable, many thought that it demonstrated our ignorance and stupidity, and some felt it outright heresy.&lt;/p&gt;
&lt;p&gt;So I noted with some interest Julio Hamano’s &lt;a href=&quot;http://git-blame.blogspot.com/2012/02/anticipating-git-1710.html&quot;&gt;blog post about the forthcoming release of git 1.7.10&lt;/a&gt;, which is slated to include a change to the way that merge commits work: users will now be prompted to edit the commit message, rather than just accepting a default one. Actually, what I found most interesting where Linus Torvalds’ comments on this change, particularly where he says this: “This change hopefully makes people write merge messages to explain their merges, and maybe even decide not to merge at all when it’s not necessary.” His comments are quoted more fully in the above-linked blog article; unfortunately I don’t know how to link directly to &lt;a href=&quot;https://plus.google.com/102150693225130002912/posts&quot;&gt;his&lt;/a&gt; Google+ post. And Julio Hamano makes this remark: “Merging updated upstream into your work-in-progress topic without having a good reason is generally considered a bad practice. […] Otherwise, your topic branch will stop being about any particular &lt;em&gt;topic&lt;/em&gt; but just a garbage heap that absorbs commits from many sources, both from you to work on a specific goal, and also from the upstream that contains work by others made for random other unfocused purposes.”&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2012/03/git-workflow/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 02 Mar 2012 20:24:00 GMT</pubDate><category>git</category><category>postgresql</category></item><item><title>Keeping Local Git Branches Up To Date</title><link>https://rhaas.dev/blog/2011/02/keeping-local-git-branches-up-to-date/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-5224866883744886037</guid><description>&lt;p&gt;Because I spend most of my time working on the master branch of the &lt;a href=&quot;http://git.postgresql.org/gitweb?p=postgresql.git&quot;&gt;PostgreSQL git repository&lt;/a&gt;, I prefer to work with just a single clone. The PostgreSQL wiki page &lt;a href=&quot;http://wiki.postgresql.org/wiki/Committing_with_Git&quot;&gt;Committing with Git&lt;/a&gt; describes several ways of using multiple clones and/or git-new-workdir, but my personal preference is to just use one clone. Most of the time, I keep the main branch checked out, but every once in a while I check out one of the back-branches to look at something, or to back-patch. (If you’re unfamiliar with the PostgreSQL workflow, note that we do not merge into our official branches; we always rebase, so that there are no merge commits in our official repository. You may or may not like this workflow, but it works for us.)&lt;/p&gt;
&lt;p&gt;One small annoyance is that “git pull” doesn’t leave my clone in the state I want. Say I have the master branch checked out. “git pull” will update all of my remote tracking branches, but it will only update the local branch that I currently have checked out. This is annoying, first of all because if I later type “git log REL9_0_STABLE” I’ll only get the commits since the last time I checked out and pulled that branch, rather than as I intended the latest state of the upstream, and secondly because it leads to spurious griping when I later do “git push”: it complains that the old branches can’t be pushed because it wouldn’t be a fast-forward merge. This is of course a little silly: since my branch tip is an ancestor of the tracking branch, it would be more reasonable to conclude that I haven’t updated it than to imagine I meant to clobber the origin.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2011/02/keeping-local-git-branches-up-to-date/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 17 Feb 2011 14:23:00 GMT</pubDate><category>git</category><category>postgresql</category></item><item><title>Stupid Git Tricks for PostgreSQL</title><link>https://rhaas.dev/blog/2010/09/stupid-git-tricks-for-postgresql/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-2870030472922551183</guid><description>&lt;p&gt;Even before &lt;a href=&quot;http://git.postgresql.org/gitweb?p=postgresql.git;a=summary&quot;&gt;PostgreSQL switched to git&lt;/a&gt;, we had a git mirror of our old CVS repository. So I suppose I could have hacked up these scripts any time. But I didn’t get around to it until we really did the switch. Here’s the first one. It’s a one-liner. For some definition of “one line”.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2010/09/stupid-git-tricks-for-postgresql/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 28 Sep 2010 17:17:00 GMT</pubDate><category>git</category><category>postgresql</category></item><item><title>Enjoying Git</title><link>https://rhaas.dev/blog/2010/09/enjoying-git/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-2943224563332054271</guid><description>&lt;p&gt;OK, I admit it. This is awesome. I’m still getting used to committing to &lt;a href=&quot;http://www.postgresql.org/&quot;&gt;PostgreSQL&lt;/a&gt; with &lt;a href=&quot;http://git-scm.com/&quot;&gt;git&lt;/a&gt; rather than &lt;a href=&quot;http://www.nongnu.org/cvs/&quot;&gt;CVS&lt;/a&gt;, but it’s sort of like the feeling of being let out of the dungeon. Wow, sunlight, what am I supposed to do about that?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2010/09/enjoying-git/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 24 Sep 2010 13:35:00 GMT</pubDate><category>git</category><category>postgresql</category></item><item><title>Git Conversion, Take Two</title><link>https://rhaas.dev/blog/2010/09/git-conversion-take-two/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-7511164377889869274</guid><description>&lt;p&gt;The &lt;a href=&quot;http://www.postgresql.org/&quot;&gt;PostgreSQL&lt;/a&gt; project will be making its &lt;a href=&quot;https://www.postgresql.org/message-id/12721.1284740826@sss.pgh.pa.us&quot;&gt;second attempt to migrate from CVS to git&lt;/a&gt; this coming Monday. In a &lt;a href=&quot;/blog/2010/09/so-why-isnt-postgresql-using-git-yet/&quot;&gt;previous blog post&lt;/a&gt;, I talked about some of the difficulties we’ve had getting a clean conversion of our project history to git. I was surprised that a number of people suggested throwing out our development history and just moving the head of each branch to git; and I agree with some of the later comments that this would be a bad idea. I refer back to our development history fairly frequently, for a variety of reasons: to determine when particular features were introduced, to determine what patch last touched a particular area of the code, to see how old a particular bit of code is, and sometimes even to model a new patch on a previous patch that added a similar feature. So I’d find it very painful to lose convenient access to all of that history. Even a somewhat messed-up conversion would be better than no conversion at all.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2010/09/git-conversion-take-two/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 18 Sep 2010 05:01:00 GMT</pubDate><category>git</category><category>postgresql</category></item><item><title>So, Why Isn&apos;t PostgreSQL Using Git Yet?</title><link>https://rhaas.dev/blog/2010/09/so-why-isnt-postgresql-using-git-yet/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-4314780563700007707</guid><description>&lt;p&gt;Just over a month ago, I wrote a blog posting entitled &lt;a href=&quot;/blog/2010/08/git-is-coming-to-postgresql/&quot;&gt;Git is Coming to PostgreSQL&lt;/a&gt;, in which I stated that we planned to move to git sometime in the next several weeks. But a funny thing happened on the way to the conversion. After we had frozen the &lt;a href=&quot;http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/&quot;&gt;CVS repository&lt;/a&gt; and while Magnus Hagander was in the process of performing the migration, using &lt;a href=&quot;http://cvs2svn.tigris.org/cvs2git.html&quot;&gt;cvs2git&lt;/a&gt;, I happened to notice - just by coincidence - that the conversion &lt;a href=&quot;https://www.postgresql.org/message-id/AANLkTimYkK6JH+ucaNvkQZUEPMbJqtSWKpCCNzpss6Jt@mail.gmail.com&quot;&gt;had big problems&lt;/a&gt;. cvs2git had interpreted some of the cases where we’d back-patched commits from newer branches into older branches as merges, and generated merge commits. This made the history look really weird: the merge commits pulled in the entire history of the branch behind them, with the result that newer commits appeared in the commit logs of older branches, even we didn’t commit them there and the changes were not present there.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2010/09/so-why-isnt-postgresql-using-git-yet/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 12 Sep 2010 11:00:00 GMT</pubDate><category>git</category><category>postgresql</category></item><item><title>Git is Coming to PostgreSQL</title><link>https://rhaas.dev/blog/2010/08/git-is-coming-to-postgresql/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-5852027121178015108</guid><description>&lt;p&gt;As discussed at the &lt;a href=&quot;http://wiki.postgresql.org/wiki/PgCon_2010_Developer_Meeting&quot;&gt;PGCon 2010 Developer Meeting&lt;/a&gt;, &lt;a href=&quot;http://www.postgresql.org/&quot;&gt;PostgreSQL&lt;/a&gt; is scheduled to adopt &lt;a href=&quot;http://git-scm.com/&quot;&gt;git&lt;/a&gt; as its version control system some time in the next few weeks. &lt;a href=&quot;http://people.planetpostgresql.org/andrew/&quot;&gt;Andrew&lt;/a&gt; &lt;a href=&quot;http://people.planetpostgresql.org/andrew/&quot;&gt;Dunstan&lt;/a&gt;, who maintains the &lt;a href=&quot;http://pgbuildfarm.org/&quot;&gt;PostgreSQL build farm&lt;/a&gt;, has adapted the build farm code to work with either CVS or git; meanwhile, &lt;a href=&quot;http://www.hagander.net/&quot;&gt;Magnus Hagander&lt;/a&gt; has done a &lt;a href=&quot;http://git.postgresql.org/gitweb?p=postgresql-migration.git;a=summary&quot;&gt;trial conversion&lt;/a&gt; so that we can all see what the new repository will look like. My small contribution was to write &lt;a href=&quot;http://wiki.postgresql.org/wiki/Committing_with_Git&quot;&gt;some documentation for the PostgreSQL committers&lt;/a&gt;, which has subsequently been further edited by &lt;a href=&quot;http://users.tkk.fi/%7Ehlinnaka/&quot;&gt;Heikki Linnakangas&lt;/a&gt; (the link here is to his personal web page, whose one complete sentence is one of the funnier things I’ve read on the Internet).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2010/08/git-is-coming-to-postgresql/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 08 Aug 2010 02:08:00 GMT</pubDate><category>git</category><category>postgresql</category></item></channel></rss>