简体   繁体   中英

Git Push Error ( Local to Remote ) in VPS Git Server?

I've written a small django site in my Mac(Sierra OS), and I wanna to put it in my new vps(digital ocean CentOS 7) . I have successfully created git server there.

My local django project has an local git repository,I set remote url to my centOS git server site. And everything is going well.. I push my project to the server … and finally, it is weird that when the push task has done, I enter the remote file, and found that the 'push task' has only push my local .git file directory to the server .. and any other project file is ignored! Even later, I added more commits, but those made no difference.

I tried to create a new repo in github.com. and push my project to the github in the exactly same way, but it works well in the github platform --- all of my project files have sucessfully pushed to the github server.

How could I solve the problem?

Try to reinstall your vps and setup again git server.

After setup new server try to push by ssh with debug, for example:

git add *
git commit -m "Commit description"
GIT_TRACE=1 git push origin master

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM