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?
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?
they should be in .git (the actual repo). The outer folder is not a repo, it's a work directory.
btw. The man page says:
DESCRIPTION
Updates remote refs using local refs, while sending objects necessary to complete the given refs.
You can make interesting things happen to a repository every time you push into it, by setting up hooks there. See documentation for git-receive-pack(1).
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.
Edit: Actually it looks like changing your post-update hooks is the proper way to do this.
If you really need to do this you can: git reset --hard or git stash
This is probably not the recommended way, but will have the desired effect.