Is it possible to git pull an older version?
Hey all, I know this is a little bit off topic, but I figured I'd ask here, since FreeSWITCH is what I'm "git pull"ing.. I've run into a situation where I'm unable to successfully compile the latest versions of FreeSWITCH, and I'm thinking it's because I've been running an older version (FreeSWITCH Version 1.0.head (git-6f4c4ea 2011-09-20 15-22-09 +0400)) for quite some time. I'm not altogether unhappy with the way it's running, but I also don't like being in the situation I'm currently in, where I'm unable to update my installation, and since I've updated my sources, I'm also unable to compile any additional modules for my existing version. Just wondering if anyone knows how to do a git pull but specify an older date / version and revert your sources back to that. I've done a little bit of digging (and will continue to do so), but so far haven't come up with any syntax that does this successfully. Sorry for asking such a n00b question, but I don't use git regularly, actually I don't use it for anything except FreeSWITCH. BTW: My installation is running on Debian 6.0.4 Linux, installed following all the guides in all the default locations. Randy
If you have done a git pull, you can do git checkout [version] where [version] is the commit hash you want to use (you can specify the first chars, i.e. your current commit hash is 6f4c4ea) On Mon, Mar 26, 2012 at 4:55 PM, Randy Andrade <randy.andrade@gmail.com>wrote:
Hey all, I know this is a little bit off topic, but I figured I'd ask here, since FreeSWITCH is what I'm "git pull"ing..
I've run into a situation where I'm unable to successfully compile the latest versions of FreeSWITCH, and I'm thinking it's because I've been running an older version (FreeSWITCH Version 1.0.head (git-6f4c4ea 2011-09-20 15-22-09 +0400)) for quite some time. I'm not altogether unhappy with the way it's running, but I also don't like being in the situation I'm currently in, where I'm unable to update my installation, and since I've updated my sources, I'm also unable to compile any additional modules for my existing version.
Just wondering if anyone knows how to do a git pull but specify an older date / version and revert your sources back to that. I've done a little bit of digging (and will continue to do so), but so far haven't come up with any syntax that does this successfully.
Sorry for asking such a n00b question, but I don't use git regularly, actually I don't use it for anything except FreeSWITCH.
BTW: My installation is running on Debian 6.0.4 Linux, installed following all the guides in all the default locations.
Randy
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Yes you can, I have been working on some tips for how to use git bisect to actually track down an exact situation like this. Its not yet complete but ill paste what I have so far: git bisect start [bad_commit] [good_commit] -- [path1] [path2] ... or git bisect start [bad_commit] [HEAD~10] - within the last 10 it broke then compile / test etc/ the tell git: git bisect bad or git bisect good then it will move on to the next git bisect reset when done git bisect skip if you cant test a specific revision Auto have it test each one if you have a script: git bisect run [my_script] [arguments] Note that the script (my_script in the above example) should exit with code 0 if the current source code is good, and exit with a code between 1 and 127 (inclusive), except 125, if the current source code is bad. So for you, you would want to do: git bisect start HEAD HEAD~100 lets say if you knew 100 commits ago was fine. Then try compiling and use git bisect bad if it works or git bisect good if it doesn't. This will track down where it stopped working for you so not only you know but we will have an easy time fixing it (probably) once you can tell us the exact commit. If you want to go back to a specific commit you can use git log to see the commits too rather than just jumping back a fixed number. ~Mitch
participants (3)
-
Mitch Capper
-
Randy Andrade
-
Stephen Wilde