我試圖使用Git爲我的網站。該網站在我們的網絡服務器上。遠程Git倉庫在文檔根
mkdir /home/website/public_html
cd /home/website/public_html
git --bare init
然後我去到本地計算機,改成在那裏我有我的文件的目錄
git remote rm origin
git remote add origin [email protected]:/home/website/public_html
git push origin master
Enter passphrase for key '/c/Users/git/.ssh/id_rsa':
Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (6/6), 460 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)
To [email protected]:/home/website/public_html
* [new branch] master -> master
但現在,當我到我回我的服務器:
ls /home/website/public_html
branches config description HEAD hooks info objects refs
我推送到服務器的文件在哪裏?我是否以這種錯誤的方式去做? (本地文件夾,我從推的唯一事情是一個自述)
你的意思是'git push origin master'和'git pull origin master'? – 2013-04-23 09:59:13
是的。謝謝提及 – 2013-04-23 10:08:40