I have an empty repo and cloned it on my local machine.
Next I have created created some files.
git status in the terminal (in the project directory), no files show up as user, but when I run it as root they are visible.
I've installed git via the git installer for OSX, installed XCode command line tools, and added git to
I'm also using the Atlassian SourceTree app.
Same problem, but when I run this app as root, it sees the new files.
Anybody got an idea of what can be the problem?
You should not run git as root user, and you should never ever run git as root user on a project which your normally use as normal user.
Running git as root will create files belonging to root (e.g.
.git/index, ...) which your normal user won't be able to update later.
chownto restore the correct ownership
Do you have permission as user to view the folder files? sounds like the permissions are for root only
ls -la in terminal will show you the group and owner. If your user is not in the group or not the owner you will not be able to read the folder content.
sudo chmod 655 .
Open terminal as user and try to list the file content. If you can cant see the files change the group or permissions of the folder so everyone (or whoever you choose) can read/write to this folder.