Configure Git for a Django project on ubuntu 16.04
The last piece in my server config is to set up git to allow for automatic deployment from my dev workspace to my live workspace. I've not used git with Django before, I work alone and only use git to keep a track of my changes in code and filezilla files over from dev -> live. So I'm just trying to make sure my knowledge is right before I do this. I have read this: https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps
My Django set up, has been taken from @jellingwood brilliant tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
So the path to my django project would be?
myproject would be the directories:
From the git guide I mentioned, they use the following fictitious paths
Your server live directory: /var/www/domain.com (I assume mine should be:/home/sammy/myproject)?
Your server repository: /var/repo/site.git (Assume this is the path to my github repo OR is it am I creating a repo within my own server)?
cd /home/sammy/myproject mkdir repo && cd repo mkdir site.git && cd site.git git init --bare
Because I already have stuff in
myproject should it just be
git init (and drop the --bare)?
When it comes to local machine set up, the guide says:
git remote add live ssh://email@example.com/var/repo/site.git
I'm thinking that this is to a repo within my own server as I type this now - If so, as a follow up question: How would I make it where it also pushed to a private github repo, so I could see and track the changes over time, or is there a way to still do this following the current guide?
Could someone clarify the process with regards to Django and not breaking the Django setup/virualenvs etc?