I want to pull down an older version of the PKGBUILD, config files, etc. for kernel26 from git. How is this most efficiently (bandwidth wise) accomplished?
cd /home/facade/git/arch_packages git clone git://projects.archlinux.org/svntogit/packages.git # if this was done previously # cd kernel26 && git pull origin
From here, how am I able to see the various version of for example PKGBUILD, select the one that corresponds to say 188.8.131.52-1 and pull it and the associated files?
there may be some more efficient way to do that but that should work anyway:
then search for the kernel version you're interested in using "/"
see the commit related to the update and run:
git checkout <commit>
now your repo's state should be exactly the same as the time of this commit.
you could also check if the repo owner uses tags for each version:
if it's the case, then you could simply:
git checkout <tag>
I have an extremely limited usage of git so, again, there may be some better ways to do that.
All design goals must be phrased in such a way that it is hard to use them as slogans to justify stupidity.
Thanks for the reply. Your instructions worked perfectly (no tags btw). I won't mark as solved yet in case others perhaps more savvy with git care to comment.
EDIT: question for someone: when I pulled down the commit, is there a way to preserve the original date/time stamps? I didn't see anything in the man page but this seems like something people would want to see.
git checkout 1cb8b62df9e00edf475a47f118208327a76c898a
Last edited by graysky (2011-06-19 17:21:13)
If you know what the commit message looks like, then you can do something like this (maybe use show first to check that you have the correct commit):
git checkout ':/kernel26 184.108.40.206-1'
BTW the git-rev-parse manpage is full of goodness.
When I pulled down the commit, is there a way to preserve the original date/time stamps? I didn't see anything in the man page but this seems like something people would want to see.
Is it something you want to see? Usually if I care about the timestamps of files checcked out at all, it’s because I’d want a “make” command to notice the changed source files. I like to think of checking out a different version something with Git or Subversion as being like editing the files or applying a patch.