I'm a newbie when it comes to git and i went through some video tutorials here
After seeing these tutorials i tried to set up a git repo with my friend using ssh
Note:
- We are using mac snow leopard
- The Git version is 1.7.5.4
I managed to set up my code in a folder lets say 'folder1' using
git init
which has my code files .
Then I create an empty repository on my friends machine lets say 'folder2
', and I made folder2
a bare repository using
git init --bare --shared
Now I wanted to setup the shared repo as the repository for folder1
's code
After this, I tried to add the remote on the bare repo using ssh
git remote add origin myFriend@hisIp:/LocationToFile
After this, I pushed the code which gave me a successful message
Now the issue is that the git repo 'folder2
' is still show an empty repo (with the folders of an empty repository) and I cant perform git operations in folder2
as
even if I do "git status
", I get "fatal: This operation must be run in a work tree
"