Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Files not showing up in the remote repository

Tags:

git

Basic question about the way git works.

I clone a repo, make some changes, commit and push the changes back to the original repo.

When I do a git log, the commit message shows up, but the actual files aren't in the directory.

Should they be there?

like image 606
Cato Johnston Avatar asked Nov 14 '25 16:11

Cato Johnston


1 Answers

You should read up a little on the difference between a bare repository and a repository with a working copy. Bare repos consists of the .git directory (which may or may not be called ".git"), which is just the repository database, without the working copy. Such repos are typically used when you want to publish your changes for others to pull. I think the official recommendation is to push only to bare repositories.

If you push to a bare repositories, your files will not appear in any working copy (except in your own repo, of course). However, they will appear in the repo, but only as database objects. So if you try to find your files in the bare repo, you will only find a bunch of administrative files and files named after sha1 checksums.

like image 132
JesperE Avatar answered Nov 17 '25 08:11

JesperE



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!