Вопрос

I have a problem: I have a git-repo on my linode which I've created with git init --bare project.git within a folder so called "project".

After that I've cloned the repo and wanted to add some new files with git add file.php" and "git commit -m "initial load" and then: "git push origin master"

Everything works fine until here!

Now I am looking at my linode into the folder of the repo (project) and don't see any files I've pushed! I already had a look at git log where every commit is shown correctly. But where're my files???

Pls help :(

Это было полезно?

Решение

You've created a bare repo on your linode - it won't have a working copy, just the internal git representation. You can look at the log in that bare repo, but you won't see the files in the filesystem.

If elsewhere you clone the repo (a non-bare clone), it will have a working copy and you will see the files. This clone will also have a copy of the internal git representation inside the .git directory at the root of the clone.

It is normal and advisable to use a bare repo as your central coordination point, because you should not push to a non-bare repo.

Другие советы

Create a non-bare repository. Otherwise, you will only see git object/config files.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top