I'm trying to use git to deploy my local code in my remote server.
So here is what I've done in my local folder mywebsite/ :
git init
git add .
git commit -m "Initial commit"
Then, on my web server :
mkdir ~/public_html/myrepo.git
cd myrepo.git
git init --bare
Then, on my local folder mywebsite/ :
git remote add remote_mywebsite ssh://[email protected]:port/~/public_html/myrepo.git
git push remote_mywebsite master
which gave this result :
Counting objects: 89, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (74/74), done.
Writing objects: 100% (89/89), 61.94 KiB, done.
Total 89 (delta 2), reused 0 (delta 0)
To ssh://[email protected]:8943/~/public_html/myrepo.git
* [new branch] master -> master
git pull remote_mywebsite
But when I log in to my web server, in the myrepo.git, I'm still having these files and folders
./
../
branches/
config
description
HEAD
hooks/
info/
objects/
refs/
and I don't retrieve the files and folders I have in my local mywebsite folder.
How could I retrieve my code in the remote myrepo.git folder ? Did I do something wrong ?
Thanks a lot for your help!
.git
folder – Ceja