Basicaly I’m stack:
I’m developing A PHP website in Local and I was sending things via FTP to production server when it’s ok.
Now I switched to git .I created a private git repo in Bitbucket and I sanded everything from my local (master) to my remote repo on bitbucket.
Ok now everything is ok.
So what I want to do is.
1/ Working on my master local repo and when I’m satisfied with the result I push to my remote repo.
then
2/ I would like now to pull changes from bitbucket repo to my production server (linux) wich is now not a git repo and git is not yet installed on the server.
How can I do the part 2? I already know how to do the part 1.
But for part 2? How can I transform an existing project with no git repo to a git repo and pull changes from my bitbucket repo?
Hi! The easiest way would be:
You can also check, Importing code from an existing project for more information.
Hope that helps!
Ana
Hi Ana, Thank you for your reply,
2/ Clone your repo from Bitbucket to your prod server, Git clone.
But git clone
is primarily used to point to an existing repo and make a clone or copy of that repo at in a new directory, In my case i have already a website in production with many daily visitor, so no way to downtime.
and the git clone is for empty project not for already project in production.I'm wrong?
3/Add any new files / changes to the repo in the production server.
I don't understand this point. adding new file in the production server ? using FTP ? how ? that's what i would like to know can you explain ? how can it be done using git?
4/ Push to Bitbucket so you have the same contents in both environments
Push to bitbucket from where? my local repo ? and if yes then it was my question how can i pull all changes pushed to bitbucket to my production server using git?
Thank's for your help be patient with me im new to this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.