Here is the situation:
PRODUCTION SERVER
- Website A (/home/a/www)
- Website B (/home/b/www)
- Website C (/home/c/www/)
DEVELOPMENT COMPUTERS
[currently empty as we are setting things up... ever developer has an own client machine where we will be editing the files]
WHAT I DID
On Production:
cd /home/a/www/
git init
add .
commit -m "Initial loading of files"
cd /home/b/www/
git init
add .
commit -m "Initial loading of files"
cd /home/c/www/
git init
add .
commit -m "Initial loading of files"
So now all projects are in separate git projects. Now the idea is to load them on every developer's computer, who can then edit it and upload when necessary. Say I want to edit project B:
cd ~/
git clone ssh://server/home/b/www/ website_b
The developer then edits the website, and is ready to upload the changes:
cd ~/website_b
git commit -a -m "I have made some changes"
git push
I thought this was the correct procedure, and that this would upload my changes to /home/b/www/
on the production server. However, I get a bunch of warnings and things get mixed up. I have the same problem as here: git: updating the current branch.
However, I am very new to git and have a hard time understanding the concepts and the workflow. Branches, trunks, master, origin, are all a bit unclear to me. I want to keep things simple for now and just get it working. We never work with more than 1 person at the same time on one project, and we do not need to create sub-projects (branches?). At least, for now. I just want git to work. I want to:
- Download the current projects from the production server
- Make changes
- Upload them
That's all. What is going wrong here, or what should I read / learn / practice to better understand this?