简体   繁体   中英

Deploy to my server with Git

I have a development of a django project on my day-to-day laptop. Now I have put together a server with Ubuntu, nginx, gunicorn with postgreSQL.

I have pip't git on both my laptop and server. And done a 'git init' in my project on the laptop.

Now I am trying to push/deploy this on my local server.

I have done tons of commands that, more or less, look like this

git push --set-upstream ssh://admin@192.168.1.240/home/admin/Django/ master

Do not think I have to say that I am new to all this exciting stuff. It is very interesting, but now my head is foggy and I am stuck.

Pointers in right direction are much appreciated! =)

First you have to add and commit to the current local repo. Try 'git add' and 'git commit' for that.

Next, add the remote "server" machine, use "git remote add", such as:

git remote add origin 192.168.1.240:/home/admin/Django

Finally use the 'git push' command to push the local to the remote:

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