threads / discuss / 25158

Newbie question

Subject: Newbie question

## tl;dr

8 messages between Sep 19, 2010 and Sep 20, 2010.

replies: 7people: 6as markdown or json

kinley· Sep 19, 2010, 23:51 UTC · lore
Hi,
I am new to question. Please help me with this.
I copied an already existing project from a remote server using scp to my
local directory.
The contents of this directory are
   branches
   config
   description
   HEAD
   hooks
   info
   objects
   ref

I checked all the directories and sub-directories but could not find a single source code file (in C language). All I can see at the leaf level appear to be MD5 hash code.

Is there any command to retrieve the source files ? As per manual, only then I guess I can add them to git.

Any help would be appreciated. Thanks

-- 
View this message in context: http://git.661346.n2.nabble.com/Newbie-question-tp5548737p5548737.html
Sent from the git mailing list archive at Nabble.com.
Andrew Keller· Sep 19, 2010, 23:59 UTC · re: kinley · lore

Re: Newbie question

On Sep 19, 2010, at 7:51 PM, kinley wrote:
Show 13 quoted lines
> Hi,
> I am new to question. Please help me with this.
> I copied an already existing project from a remote server using scp to my
> local directory.
> The contents of this directory are
>   branches
>   config
>   description
>   HEAD
>   hooks
>   info
>   objects
>   ref
This directory listing is what you would expect if you were looking at the repository itself.  To access your files in the repository, you want to create a non-bare (normal) clone.
git clone path-to-git-repo
On a side note, git can clone over ssh, so you don't need to use scp to copy a project over the network.  If your intent is to create a clone of a remote project on your computer, then cloning over ssh generally takes fewer commands than doing the copy manually first.
~ Andrew Keller
kinley· Sep 20, 2010, 00:50 UTC · re: Andrew Keller · lore

Re: Newbie question

Thanks for your help.
Actually now I tried doing this
git clone ssh://user@host/~/GPUProject/Histogram
but getting

bash: git-upload-pack: command not found fatal: The remote end hung up unexpectedly

I tried several ways of specifying the path of the URL assuming that this could be a path issue but every time it gives the same error.

Thanks once again.
-- 
View this message in context: http://git.661346.n2.nabble.com/Newbie-question-tp5548737p5548842.html
Sent from the git mailing list archive at Nabble.com.
Imran M Yousuf· Sep 20, 2010, 01:47 UTC · re: kinley · lore

Re: Newbie question

Try: git clone user@host:/home/user/GPUProject/Histogram/.git/

I added .git assuming that, that is the folder to which you gave the ls output in your first email, the path should be upto that folder.

On Mon, Sep 20, 2010 at 6:50 AM, kinley <arjuncode@gmail.com> wrote:
Show 24 quoted lines
>
> Thanks for your help.
>
> Actually now I tried doing this
>
> git clone ssh://user@host/~/GPUProject/Histogram
>
> but getting
>
> bash: git-upload-pack: command not found
> fatal: The remote end hung up unexpectedly
>
> I tried several ways of specifying the path of the URL assuming that this
> could be a path issue but every time it gives the same error.
>
> Thanks once again.
> --
> View this message in context: http://git.661346.n2.nabble.com/Newbie-question-tp5548737p5548842.html
> Sent from the git mailing list archive at Nabble.com.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
-- 
Imran M Yousuf
Entrepreneur & CEO
Smart IT Engineering Ltd.
Dhaka, Bangladesh
Twitter: @imyousuf - http://twitter.com/imyousuf
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557
Kevin Ballard· Sep 20, 2010, 06:55 UTC · re: kinley · lore

Re: Newbie question

It sounds like git-upload-pack is not in the PATH of your non-interactive shell. Assuming git is installed on the remote host, you should ssh in to it and figure out where git is installed (run `git --exec-path`), then run your command like so
git clone -u /path/to/libexec/git-core/git-upload-pack ssh://user@host/~/GPUProject/Histogram
In my case that path is /usr/local/libexec/git-core/git-upload-pack.
-Kevin Ballard
On Sep 19, 2010, at 5:50 PM, kinley wrote:
Show 23 quoted lines
> 
> Thanks for your help.
> 
> Actually now I tried doing this
> 
> git clone ssh://user@host/~/GPUProject/Histogram
> 
> but getting
> 
> bash: git-upload-pack: command not found
> fatal: The remote end hung up unexpectedly
> 
> I tried several ways of specifying the path of the URL assuming that this
> could be a path issue but every time it gives the same error.
> 
> Thanks once again.
> -- 
> View this message in context: http://git.661346.n2.nabble.com/Newbie-question-tp5548737p5548842.html
> Sent from the git mailing list archive at Nabble.com.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
kinley· Sep 20, 2010, 19:32 UTC · re: Kevin Ballard · lore

Re: Newbie question

Thanks Kevin and All.
Specifying the path of git-upload-pack helped.
Thanks once again.
-- 
View this message in context: http://git.661346.n2.nabble.com/Newbie-question-tp5548737p5551972.html
Sent from the git mailing list archive at Nabble.com.
Jakub Narebski· Sep 20, 2010, 08:31 UTC · re: kinley · lore

Re: Newbie question

kinley <arjuncode@gmail.com> writes:
> I am new to question. Please help me with this.
> I copied an already existing project from a remote server using scp to my
> local directory.
In the future use "git clone <scp-location>" instead of 'scp'.
Show 16 quoted lines
> The contents of this directory are
>    branches
>    config
>    description
>    HEAD
>    hooks
>    info
>    objects
>    ref
> 
> I checked all the directories and sub-directories but could not find a
> single source code file (in C language).
> All I can see at the leaf level appear to be MD5 hash code.
> 
> Is there any command to retrieve the source files ? 
> As per manual, only then I guess I can add them to git.

You have the repository itself (the object database containg all version info plus other info). Put those files and directories into <project>/.git subdirectory, and use "git checkout" from within it. You should have checked out files in <project>/ directory.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Alex Riesen· Sep 20, 2010, 08:39 UTC · re: kinley · lore

Re: Newbie question

On Mon, Sep 20, 2010 at 01:51, kinley <arjuncode@gmail.com> wrote:
Show 18 quoted lines
>
> Hi,
> I am new to question. Please help me with this.
> I copied an already existing project from a remote server using scp to my
> local directory.
> The contents of this directory are
>   branches
>   config
>   description
>   HEAD
>   hooks
>   info
>   objects
>   ref
>
> I checked all the directories and sub-directories but could not find a
> single source code file (in C language).
> All I can see at the leaf level appear to be MD5 hash code.
It is SHA-1
> Is there any command to retrieve the source files ?
try this:
  git clone . ../Histogram
But others are right, and you should have used git clone, instead of scp.

← back to recent threads