What we are trying to do:
We are trying to use git to create an efficient development process as well as keep a current backup of our website. We have three machines in the loop:
- production: Hosted on remote webserver - LAMP, git 2.0, centos
- back-up: local workstation - windows, git Shell
- development/testing: An on-site webserver - LAMP, git 2.0, centos 6
We want to clone a bare repository down from the Production server to my Workstation to keep a current backup.
I want to create development branches on my local machine to make changes to files which I want to pull into a repository on the Development/testing server. This way I can use this repository as the test step to merge things and be sure they work properly.
Once everything works I want to pull the new branch over to the Production server and merge to complete the update to the live site. Then once that is in place, the next backup would catch the last updates.
The Problem:
We have tried starting with a --bare repo on the production server and cloning it down to the other two machines. This works to get the repo on the machines, but doesn't pull any files that have been added and committed on the --bare repo. We also can't push changes up to the production server.
We have also tried just using git init on the production server, but the problem persists. We are using the following syntax:
git init <repo> or git init --bare <repo>
git add .
git commit -m "message"
git clone ssh://user@server.com:/path/below/repo.git or repo/repo.git
git remote add <name> <repo>
git pull <remote>
git fetch <remote>
The Question:
Are we not using git properly as production tool, or are we making some syntactical or other error in using git?