I have a problem with git, here my process
I create a file git on the dev serv git init --bare .git
I clone this repository .git on my local pc. git clone ssh://root@ipservdev.com/var/www/siteweb/.git
i add all my files cd /var/www/siteweb git add * git commit -m "First Commit" git push -u ssh://root@ipservdev.com/var/www/siteweb/.git master
But, i back on my dev server, none file of my site are uploaded (ex : index.php, config.php or others) . Why ?
Buy, I have no error. Counting objects: 3, done. Writing objects: 100% (3/3), 234 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To ssh://root@ipservdev/var/www/siteweb/.git * [new branch] master -> master Branch master set up to track remote branch master from ssh://root@ipservdev/var/www/siteweb/.git.
Your repository is a 'bare repository', it didn't have a working directory with your pulled files.
Edit: I answer here, just for make it more clear and complete. As far as I know, you have here three options:
master
branch is 'special' Also I recommend you to read de pro-git book it's really useful and you will see a lot of common use cases.
Hope i help you!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.