# Newbie question

8 messages from 2010-09-19 to 2010-09-20. Participants: kinley, Andrew Keller, Imran M Yousuf, Kevin Ballard, Jakub Narebski, Alex Riesen.
Thread: https://gitlist.dev/t/25158

## kinley, 2010-09-19 23:51

Subject: Newbie question
Message-ID: <1284940287810-5548737.post@n2.nabble.com>
URL: https://gitlist.dev/e/1284940287810-5548737.post%40n2.nabble.com

```

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, 2010-09-19 23:59

Subject: Re: Newbie question
Message-ID: <04E0C626-C16F-43A9-9AB7-41760B682F13@kellerfarm.com>
URL: https://gitlist.dev/e/04E0C626-C16F-43A9-9AB7-41760B682F13%40kellerfarm.com
In-Reply-To: <1284940287810-5548737.post@n2.nabble.com>

```
On Sep 19, 2010, at 7:51 PM, kinley wrote:

> 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, 2010-09-20 00:50

Subject: Re: Newbie question
Message-ID: <1284943806785-5548842.post@n2.nabble.com>
URL: https://gitlist.dev/e/1284943806785-5548842.post%40n2.nabble.com
In-Reply-To: <04E0C626-C16F-43A9-9AB7-41760B682F13@kellerfarm.com>

```

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, 2010-09-20 01:47

Subject: Re: Newbie question
Message-ID: <AANLkTi=GV2WKKBS=_oCO6qyusyXFxj_Gp5LWuPV6yeOj@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DGV2WKKBS%3D_oCO6qyusyXFxj_Gp5LWuPV6yeOj%40mail.gmail.com
In-Reply-To: <1284943806785-5548842.post@n2.nabble.com>

```
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:
>
> 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, 2010-09-20 06:55

Subject: Re: Newbie question
Message-ID: <F47832A2-C25F-470A-81DE-9670F13DD4C2@sb.org>
URL: https://gitlist.dev/e/F47832A2-C25F-470A-81DE-9670F13DD4C2%40sb.org
In-Reply-To: <1284943806785-5548842.post@n2.nabble.com>

```
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:

> 
> 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

```

## Jakub Narebski, 2010-09-20 08:31

Subject: Re: Newbie question
Message-ID: <m31v8pl11m.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m31v8pl11m.fsf%40localhost.localdomain
In-Reply-To: <1284940287810-5548737.post@n2.nabble.com>

```
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'.

> 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, 2010-09-20 08:39

Subject: Re: Newbie question
Message-ID: <AANLkTikFSEbK+ho5mvaOfmv7a5SB7Sp2_5H-5dhbfaky@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikFSEbK%2Bho5mvaOfmv7a5SB7Sp2_5H-5dhbfaky%40mail.gmail.com
In-Reply-To: <1284940287810-5548737.post@n2.nabble.com>

```
On Mon, Sep 20, 2010 at 01:51, kinley <arjuncode@gmail.com> wrote:
>
> 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.

```

## kinley, 2010-09-20 19:32

Subject: Re: Newbie question
Message-ID: <1285011152025-5551972.post@n2.nabble.com>
URL: https://gitlist.dev/e/1285011152025-5551972.post%40n2.nabble.com
In-Reply-To: <F47832A2-C25F-470A-81DE-9670F13DD4C2@sb.org>

```

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.

```
