Create a working environment against central git server
------------------------------------------------------
git init-db
git clone ssh:///path/to/repos repos
Setup stuff for nice log messages and stuff
-------------------------------------------
git config user.name "FirstName LastName"
git config user.email "user@example.com"
git config --global color.branch "auto"
git config --global color.status "auto"
git config --global color.diff "auto"
Normal work flow
=================
update from central git server:
git pull
see changes made locally:
git status
git show
commit changes (commit to local git repository)
git add XXXX.txt
git commit -m "Fixed XXXX"
or if all changed files should be committet
git commit -a -m "Fixed all bugs :)"
Push all local commits to central server:
git push
Creating a new remote branch from an existing remote branch
===========================================================
All services in the system build upon a common framework
and are developed as branches of this framework. In order to create a
new service you should branch of the framework branch like this:
create a localbranch based upon a the remote framework branch:
git checkout --track -b framework origin/framework (get the framework branch)
git branch my-new-service (create a new local branch for the service)
push it to central server:
git push origin my-new-service:refs/heads/my-new-service
Use in on another computer:
git pull
git checkout --track -b my-new-service origin/my-new-service
(normal work flow from here)
Working on a remote branch
==========================
git checkout --track -b localbranchname origin/remotebranchname
git pull
(do as in a normal work flow)
Working on multiple branches
============================
list local branches:
git branch
list remote branches:
git branch -r
switch to local branch:
git checkout mybranch1
switch to local master branch:
git checkout master
Merging service framework with a service that builds upon the framework
=======================================================================
...
More info:
http://www.sourcemage.org/Git_Guide