320
edits
m (→git) |
|||
Line 782: | Line 782: | ||
I'm not knowledgeable about details of the RaspBerry PI build; what I can | I'm not knowledgeable about details of the RaspBerry PI build; what I can | ||
say regarding your message is: when you clone a Git repository with no | say regarding your message is: when you clone a Git repository with no | ||
special option such as --bare, some branch is initially checked out (often, | special option such as <code>--bare</code>, some branch is initially checked out (often, | ||
this is 'master'). This means that only this particular branch is clearly | this is 'master'). This means that only this particular branch is clearly | ||
visible in the directory where the repository has been cloned. Other | visible in the directory where the repository has been cloned. Other | ||
branches may be present in hidden/machine form inside the .git subdirectory | branches may be present in hidden/machine form inside the .git subdirectory | ||
after you do | after you do <code>git fetch foo</code>, where foo is the name of a <s>branch</s>. | ||
Run | Run <code>git branch -r</code> to see what branches are available remotely, then <code>git | ||
fetch foo | fetch foo</code> to retrieve the <s>branch</s> you are interested in (supposedly called | ||
'foo' here). This only happens in the .git subdirectory, but then | 'foo' here). This only happens in the .git subdirectory, but then <code>git | ||
checkout foo | checkout foo</code> should cause this branch to appear in the filesystem, | ||
replacing whatever was previously checked out in your clone of the upstream | replacing whatever was previously checked out in your clone of the upstream | ||
repository. In the case of the download_and_compile.sh script, | repository. In the case of the download_and_compile.sh script, | ||
Line 804: | Line 804: | ||
I have to correct something from my first reply in this thread: | I have to correct something from my first reply in this thread: | ||
The argument passed to | The argument passed to <code>git fetch</code> is not branch name (according to | ||
the manual, it's a <refspec>). The way I use this command is by | the manual, it's a <refspec>). The way I use this command is by | ||
passing a remote name, e.g. | passing a remote name, e.g. <code>git fetch origin</code> or 'git fetch | ||
upstream'. A “remote” is some place where the repository is hosted | upstream'. A “remote” is some place where the repository is hosted | ||
that is known to your clone (.git/config). Thus, your clone can fetch | that is known to your clone (.git/config). Thus, your clone can fetch | ||
branches and commits from remotes. A remote can offer many branches. | branches and commits from remotes. A remote can offer many branches. | ||
You can display info about known remotes with | You can display info about known remotes with <code>git remove -v</code> from | ||
within your clone, but I believe this info essentially comes from the | within your clone, but I believe this info essentially comes from the | ||
.git/config file. | .git/config file. |
edits