Re: [git-users] Checking out Revisions
On Fri, Jan 17, 2014 at 6:16 PM, Konstantin Khomoutov < flatw...@users.sourceforge.net> wrote: > On Fri, 17 Jan 2014 17:59:42 +0200 > Nikos Balkanas wrote: > > [...] > > > OK, so you have been told to check out a revision by the SHA-1 name > > > of its commit, and so you did. > > > > > > Also please answer the most important question: why do you think > > > something's wrong with your checkout? > > > And can we please see the result of `git status`? I'm asking this > > > because this might shed some light on the issue -- say, it'll list > > > many modified or missing or untracked files. > [...] > > # aclocal.m4 > > # autom4te.cache/ > > # config.h.in > > # config.log > > # config.status > > # config/Makefile.in > > # configure > > # depcomp > > # gnuradio-core/Makefile > > # gnuradio-core/Makefile.in > [...] > > I see already part of the problem. I wasn't told to check out any > > version in particular. I just need a specific version to work > > together with my other programs. The revision # i got from the > > repository and it is good. Apparently they didn't do a very good job > > of tracking files :-( I will add these and see what i have. > > Wait! All these files seem to be generated by autoconf and/or > by running ./configure. They *might* not be supposed to be tracked > (at least **/Makefile -- for sure). I would ask the fellow developers > about these matters. > > Having said that, I'm oblidged to ask again: with the information > you've gained during our exchange, what's wrong with your checkout? > I mean, I suspect we're dealing with an "XY problem" [1]. > > My impression is that it didn't work, since the first checkout returned immediately and i didn't notice any file or dir differences. Mind you, I am trying to get to version 2.8 of gnuradio, and I don't know which revision is that. I go by date. Repository is ~7 years back. Since then I have observed an extra dir, "gnuradio-core" that has been removed from the ditribution a few years back. At the moment it won't build. But this could be a bug in this particular release. I am trying to verify version by other means "grep -rn "version*"" etc. Don't worry, I thought about the same. and just added 1 track only. I will try to remove it. I will be able to be more specific once I fish out the version. I may be good ;-) > > > P.S. > > > Please don't top-post -- this breaks the discussion flow, which > > > sucks. > > Sorry about that, it is a gmail feature. I can respond in line, but > > gmail doesn't make it easy :-( > > Well, I just subscribe to the groups I want to participate in and use a > sensible MUA to reply to mails coming from them. > > But never mind, if it's hard to reply in line, do whatever works. > > 1. http://meta.stackoverflow.com/a/66378 > Nope it is not that big a deal. Just sometimes i forget to do it ;-) -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Checking out Revisions
On Fri, 17 Jan 2014 17:59:42 +0200 Nikos Balkanas wrote: [...] > > OK, so you have been told to check out a revision by the SHA-1 name > > of its commit, and so you did. > > > > Also please answer the most important question: why do you think > > something's wrong with your checkout? > > And can we please see the result of `git status`? I'm asking this > > because this might shed some light on the issue -- say, it'll list > > many modified or missing or untracked files. [...] > # aclocal.m4 > # autom4te.cache/ > # config.h.in > # config.log > # config.status > # config/Makefile.in > # configure > # depcomp > # gnuradio-core/Makefile > # gnuradio-core/Makefile.in [...] > I see already part of the problem. I wasn't told to check out any > version in particular. I just need a specific version to work > together with my other programs. The revision # i got from the > repository and it is good. Apparently they didn't do a very good job > of tracking files :-( I will add these and see what i have. Wait! All these files seem to be generated by autoconf and/or by running ./configure. They *might* not be supposed to be tracked (at least **/Makefile -- for sure). I would ask the fellow developers about these matters. Having said that, I'm oblidged to ask again: with the information you've gained during our exchange, what's wrong with your checkout? I mean, I suspect we're dealing with an "XY problem" [1]. > > P.S. > > Please don't top-post -- this breaks the discussion flow, which > > sucks. > Sorry about that, it is a gmail feature. I can respond in line, but > gmail doesn't make it easy :-( Well, I just subscribe to the groups I want to participate in and use a sensible MUA to reply to mails coming from them. But never mind, if it's hard to reply in line, do whatever works. 1. http://meta.stackoverflow.com/a/66378 -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Checking out Revisions
On Fri, Jan 17, 2014 at 5:43 PM, Konstantin Khomoutov < flatw...@users.sourceforge.net> wrote: > On Fri, 17 Jan 2014 16:00:24 +0200 > Nikos Balkanas wrote: > > > > > I need to check out a revision from a repository, that supports > > > > only git. I don't know much about git, but I am used to svn. > > > > It seems that git first needs s clone before doing anything. And > > > > that clone would be the current version - the wrong one in my > > > > case. After that I do: > > > > git checkout > > > > > > > > I get informed that Head now is pointing the rev-number. I need to > > > > download that revision, and also overwite anything from the > > > > current version, while erasing any extra files or dirs. > > > > > > > > I have tried everything i could find, fetch --all, clean -fd etc., > > > > but I always ene up with the initial, wrong version. > > > > > > > > What should I do? > > > > > > After you cloned a repository, like with > > > > > > git clone repo_url target_dir > > > > > > The target directory will contain a subdirectory named ".git" > > > holding the Git object and configuration store (that's what > > > constitutes the local repository), and the directory itself is > > > turned into the so-called "work tree" in Git's terms -- by default > > > `git clone` checks out the tip commit of the default branch of the > > > repository it cloned. > > > > > > Ignoring that bit for the moment, to bring the work tree into the > > > state of the revision you need, you do > > > > > > cd target_dir > > > git checkout name_of_revision > > > > > > That "name_of_revision" is a tricky part: it might be the SHA-1 > > > name of a particular commit or the name of a branch (in which case > > > it will mean the tip commit at that branch's history) or the name > > > of a tag (in which case it will mean the commit tag points to). It > > > also might be a special expression but let's pretend it's not your > > > case. > > > > > > Running out `git checkout` *does* remove files and directories from > > > the work tree if and only if they are currently tracked -- that is, > > > present in the commit the work tree's contents is based on. > > > What this means for you? If HEAD includes (tracks) a file "foo" > > > and a directory "bar", they will be in your work tree unless you've > > > deleted them by hand. Should now you check out a commit which does > > > not include the file "foo" and the directory "bar", Git will remove > > > them *unless* you have local modifications in the file "foo" or in > > > one of the files under "bar" which are tracked by HEAD. > > > > > > Let's recap: what you do *should* work; without any `git clean` etc. > > > So either you're doing something wrong or your premises are wrong. > > > Please provide more context for us: what's the name of the revision > > > you need, is it a tag or a branch (can be known by correlating this > > > name with what `git branch -a` and `git tag` output) or the SHA-1 > > > name of a commit. What exactly command do you run for checking out? > > > What's the output of running `git status` afterwards? > > > > > Thanks for the fast reply. I am breaking my head over it since > > yesterday :-( Here is the output you asked (State is after clone and > > checkout revision): > > 1) Revision: > > > > $ git describe --always --abbrev=8 --long > > e9a82163 > > > > $git branch -a > > * (no branch) > > master > [...] > > $git tag > > 3.3git > [...] > > OK, so you have been told to check out a revision by the SHA-1 name of > its commit, and so you did. > > Also please answer the most important question: why do you think > something's wrong with your checkout? > And can we please see the result of `git status`? I'm asking this > because this might shed some light on the issue -- say, it'll list many > modified or missing or untracked files. > May be you'll be able to figure what's wrong just by looking at that > output > There you go: $ git status # Not currently on any branch. # Untracked files: # (use "git add ..." to include in what will be committed) # # Nikos # aclocal.m4 # autom4te.cache/ # config.h.in # config.log # config.status # config/Makefile.in # configure # depcomp # gnuradio-core/Makefile # gnuradio-core/Makefile.in # gnuradio-core/doc/Doxyfile # gnuradio-core/doc/Makefile # gnuradio-core/doc/Makefile.in # gnuradio-core/doc/other/Makefile # gnuradio-core/doc/other/Makefile.in # gnuradio-core/doc/xml/Makefile # gnuradio-core/doc/xml/Makefile.in # gnuradio-core/gnuradio-core.pc # gnuradio-core/src/Makefile # gnuradio-core/src/Makefile.in # gnuradio-core/src/gen_interpolator_taps/Makefile # gnuradio-core/src/gen_interpolator_taps/Makefile.in # gnuradio-core/src/lib/Makefile # gnuradio-core/src/lib/Makefile.in # install-sh # ltmain.sh # missing # py-compile nothing added to commit but untracked files present (use "git add" to track) I see already part of the problem. I wasn't told to check out any version in particular. I just need a specific version to work together
Re: [git-users] Checking out Revisions
On Fri, 17 Jan 2014 16:00:24 +0200 Nikos Balkanas wrote: > > > I need to check out a revision from a repository, that supports > > > only git. I don't know much about git, but I am used to svn. > > > It seems that git first needs s clone before doing anything. And > > > that clone would be the current version - the wrong one in my > > > case. After that I do: > > > git checkout > > > > > > I get informed that Head now is pointing the rev-number. I need to > > > download that revision, and also overwite anything from the > > > current version, while erasing any extra files or dirs. > > > > > > I have tried everything i could find, fetch --all, clean -fd etc., > > > but I always ene up with the initial, wrong version. > > > > > > What should I do? > > > > After you cloned a repository, like with > > > > git clone repo_url target_dir > > > > The target directory will contain a subdirectory named ".git" > > holding the Git object and configuration store (that's what > > constitutes the local repository), and the directory itself is > > turned into the so-called "work tree" in Git's terms -- by default > > `git clone` checks out the tip commit of the default branch of the > > repository it cloned. > > > > Ignoring that bit for the moment, to bring the work tree into the > > state of the revision you need, you do > > > > cd target_dir > > git checkout name_of_revision > > > > That "name_of_revision" is a tricky part: it might be the SHA-1 > > name of a particular commit or the name of a branch (in which case > > it will mean the tip commit at that branch's history) or the name > > of a tag (in which case it will mean the commit tag points to). It > > also might be a special expression but let's pretend it's not your > > case. > > > > Running out `git checkout` *does* remove files and directories from > > the work tree if and only if they are currently tracked -- that is, > > present in the commit the work tree's contents is based on. > > What this means for you? If HEAD includes (tracks) a file "foo" > > and a directory "bar", they will be in your work tree unless you've > > deleted them by hand. Should now you check out a commit which does > > not include the file "foo" and the directory "bar", Git will remove > > them *unless* you have local modifications in the file "foo" or in > > one of the files under "bar" which are tracked by HEAD. > > > > Let's recap: what you do *should* work; without any `git clean` etc. > > So either you're doing something wrong or your premises are wrong. > > Please provide more context for us: what's the name of the revision > > you need, is it a tag or a branch (can be known by correlating this > > name with what `git branch -a` and `git tag` output) or the SHA-1 > > name of a commit. What exactly command do you run for checking out? > > What's the output of running `git status` afterwards? > > > Thanks for the fast reply. I am breaking my head over it since > yesterday :-( Here is the output you asked (State is after clone and > checkout revision): > 1) Revision: > > $ git describe --always --abbrev=8 --long > e9a82163 > > $git branch -a > * (no branch) > master [...] > $git tag > 3.3git [...] OK, so you have been told to check out a revision by the SHA-1 name of its commit, and so you did. Also please answer the most important question: why do you think something's wrong with your checkout? And can we please see the result of `git status`? I'm asking this because this might shed some light on the issue -- say, it'll list many modified or missing or untracked files. May be you'll be able to figure what's wrong just by looking at that output. Note that there's still a chance of you have been told to check out a wrong revision. P.S. Please don't top-post -- this breaks the discussion flow, which sucks. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Checking out Revisions
Thanks for the fast reply. I am breaking my head over it since yesterday :-( Here is the output you asked (State is after clone and checkout revision): 1) Revision: $ git describe --always --abbrev=8 --long e9a82163 $git branch -a * (no branch) master remotes/origin/HEAD -> origin/master remotes/origin/maint remotes/origin/master remotes/origin/next $git tag 3.3git 3.5.1git 3.5.2git 3.5git 3.6.0git 3.6.1git 3.6.2git 3.6.3git 3.6git 3.7.0git 3.7.2git 3.7.3git 3.7git distcheck-master maint-3.3.0 maint-3.4.0 maint-3.4.1 maint-3.4.2 maint-3.5.1 maint-3.5.2 maint-3.5.3 maint-3.6.0 maint-3.6.1 maint-3.6.2 v3.3.0 On Fri, Jan 17, 2014 at 3:29 PM, Konstantin Khomoutov < flatw...@users.sourceforge.net> wrote: > On Fri, 17 Jan 2014 05:08:15 -0800 (PST) > nbalka...@gmail.com wrote: > > > I need to check out a revision from a repository, that supports only > > git. I don't know much about git, but I am used to svn. > > It seems that git first needs s clone before doing anything. And that > > clone would be the current version - the wrong one in my case. > > After that I do: > > git checkout > > > > I get informed that Head now is pointing the rev-number. I need to > > download that revision, and also overwite anything from the current > > version, while erasing any extra files or dirs. > > > > I have tried everything i could find, fetch --all, clean -fd etc., > > but I always ene up with the initial, wrong version. > > > > What should I do? > > After you cloned a repository, like with > > git clone repo_url target_dir > > The target directory will contain a subdirectory named ".git" holding > the Git object and configuration store (that's what constitutes the > local repository), and the directory itself is turned into the > so-called "work tree" in Git's terms -- by default `git clone` checks > out the tip commit of the default branch of the repository it cloned. > > Ignoring that bit for the moment, to bring the work tree into the state > of the revision you need, you do > > cd target_dir > git checkout name_of_revision > > That "name_of_revision" is a tricky part: it might be the SHA-1 name of > a particular commit or the name of a branch (in which case it will mean > the tip commit at that branch's history) or the name of a tag (in which > case it will mean the commit tag points to). It also might be a > special expression but let's pretend it's not your case. > > Running out `git checkout` *does* remove files and directories from the > work tree if and only if they are currently tracked -- that is, present > in the commit the work tree's contents is based on. > What this means for you? If HEAD includes (tracks) a file "foo" and a > directory "bar", they will be in your work tree unless you've deleted > them by hand. Should now you check out a commit which does not include > the file "foo" and the directory "bar", Git will remove them *unless* > you have local modifications in the file "foo" or in one of the files > under "bar" which are tracked by HEAD. > > Let's recap: what you do *should* work; without any `git clean` etc. > So either you're doing something wrong or your premises are wrong. > Please provide more context for us: what's the name of the revision you > need, is it a tag or a branch (can be known by correlating this name > with what `git branch -a` and `git tag` output) or the SHA-1 name of a > commit. What exactly command do you run for checking out? > What's the output of running `git status` afterwards? > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Checking out Revisions
On Fri, 17 Jan 2014 05:08:15 -0800 (PST) nbalka...@gmail.com wrote: > I need to check out a revision from a repository, that supports only > git. I don't know much about git, but I am used to svn. > It seems that git first needs s clone before doing anything. And that > clone would be the current version - the wrong one in my case. > After that I do: > git checkout > > I get informed that Head now is pointing the rev-number. I need to > download that revision, and also overwite anything from the current > version, while erasing any extra files or dirs. > > I have tried everything i could find, fetch --all, clean -fd etc., > but I always ene up with the initial, wrong version. > > What should I do? After you cloned a repository, like with git clone repo_url target_dir The target directory will contain a subdirectory named ".git" holding the Git object and configuration store (that's what constitutes the local repository), and the directory itself is turned into the so-called "work tree" in Git's terms -- by default `git clone` checks out the tip commit of the default branch of the repository it cloned. Ignoring that bit for the moment, to bring the work tree into the state of the revision you need, you do cd target_dir git checkout name_of_revision That "name_of_revision" is a tricky part: it might be the SHA-1 name of a particular commit or the name of a branch (in which case it will mean the tip commit at that branch's history) or the name of a tag (in which case it will mean the commit tag points to). It also might be a special expression but let's pretend it's not your case. Running out `git checkout` *does* remove files and directories from the work tree if and only if they are currently tracked -- that is, present in the commit the work tree's contents is based on. What this means for you? If HEAD includes (tracks) a file "foo" and a directory "bar", they will be in your work tree unless you've deleted them by hand. Should now you check out a commit which does not include the file "foo" and the directory "bar", Git will remove them *unless* you have local modifications in the file "foo" or in one of the files under "bar" which are tracked by HEAD. Let's recap: what you do *should* work; without any `git clean` etc. So either you're doing something wrong or your premises are wrong. Please provide more context for us: what's the name of the revision you need, is it a tag or a branch (can be known by correlating this name with what `git branch -a` and `git tag` output) or the SHA-1 name of a commit. What exactly command do you run for checking out? What's the output of running `git status` afterwards? -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[git-users] Checking out Revisions
I need to check out a revision from a repository, that supports only git. I don't know much about git, but I am used to svn. It seems that git first needs s clone before doing anything. And that clone would be the current version - the wrong one in my case. After that I do: git checkout I get informed that Head now is pointing the rev-number. I need to download that revision, and also overwite anything from the current version, while erasing any extra files or dirs. I have tried everything i could find, fetch --all, clean -fd etc., but I always ene up with the initial, wrong version. What should I do? TIA, Nikos -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.