How to clone a git repository (BARE) from a Windows7 folder to UBUNTU16.04?

Asked

Viewed 189 times

3

My host system is Windows7 and I have a guest system in virtualbox, Ubuntu 16.04.

I shared a folder on Win7 (sf_AA_SHARE_FOLDER) into linux and into it I have another folder called CHM_FINAL_BARE which is where I want to clone the files.

As you can see in the photo below, I made a clone into my folder vhosts/chm.test on my linux home using the usual command: git clone "/home/....." chm.test

At the end of the process I get a message saying that gist cloned an empty repository and that’s not true, see photo.

Then I tried to open gitk from inside that Bare repository (as I always do) and got an error message that you cannot find HEAD, which usually happens when the folder is empty.

That is, it seems that linux git is not able to see what is inside the Windows7 folder.

Can someone tell us how to clone this repository, if that’s possible?

inserir a descrição da imagem aqui

  • Ever tried to make a commit before? git commit -m "foo bar"

  • Hi zekk, in this case you don’t need a commit. This is the initial cloning of a BARE repository. Something should come from there.

  • It... it seems that there is ago wrong with the BARE right. I tried to clone from inside the Win7 to another folder and I had the same mistake. It has nothing to do with the OS. It must be some commit I didn’t send to BARE. The fact is that virtual machine where the original project was already deleted.

  • Post the Bare repository startup command, Git version on host and guest, etc.

  • Another thing, what are you trying to do? Have a backup Bare on the host machine does not make much sense, unless you intend to give ssh access or something like that to other people (and in that case would probably transform the guest linux and not windows host on server)

  • I have a physical environment (host) in windows - 1TbSSD. I have a 1Tb HD disk as slave of my SSD. Inside this HD I have a BARE folder of repository of study projects, but they are important. It had several Win7 MV test with some different settings. When I create a new environment I clone the HD BARE. I tried to do it with linux and it didn’t work. Maybe because I deleted Win7 MV (before doing a commit?) that affected Bare. I never thought this would happen. Theoretically I should clone BARE in its last commit state.

  • The command to create git Bare was $git init --bare "CHM_FINAL_BARE". The git version on Linux is 2.7.4. The version of git on my physical (host) Win7 machine that created this Bare repository 2.6.1.windows.1

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.