From: Christian MICHON Date: Tue, 27 Feb 2007 12:43:53 GMT Subject: Re: How do get a specific version of a particular file? Message-ID: <46d6db660702270443w22361619p8cfb624780ee5a57@mail.gmail.com> In-Reply-To: quoting Linus: Well, you can just add [alias] cat=-p cat-file -p to your ~/.gitconfig file, and you're there. [ For all the non-git people here: the first "-p" is shorthand for "--paginate", and means that git will automatically start a pager for the output. The second "-p" is shorthand for "pretty" (there's no long-format command line switch for it, though), and means that git cat-file will show the result in a human-readable way, regardless of whether it's just a text-file, or a git directory ] So then you can do just git cat todo:TODO and you're done. [ So for the non-git people, what that will actually _do_ is to show the TODO file in the "todo" branch - regardless of whether it is checked out or not, and start a pager for you. ] I actually do this sometimes, but I've never done it for branches (and I do it seldom enough that I haven't added the alias). I do it for things like git cat v2.6.16:Makefile -- Christian