Wednesday, January 26, 2011

GIT: Merging changes of a branch back to master

You branched out for development and now it is time to get the improvements back to the master branch.
This is achieve by git merge while on the master branch.

To be sure to not mess up anything, I prefer to clone my repository first and do the merge there.
So best is if you commit all changes in master and dev branch. Do a couple of pushs and pulls so everything is in sync and then clone your repository to a new location.
You can directly clone the branch you want to merge then proceed to 2. otherwise do a

  • git checkout branchname

  • git checkout master

  • git merge branchname

You have to resolve any conflicts in any files by removing the spiky brackets in the file and of course take a close look what caused the conflict and fix it.
Then add the file via git add and commit it via git commit .
Do this for every file.

Thursday, January 20, 2011

CVS: Get new directories of the server

If you want to update your CVS working copy to get new directories from the server, a simple cvs up does not get these directories.
Try cvs up -d

Friday, January 14, 2011

GIT: Creating a local Repository

Till now all my posts concerned repositories already created. But how to create your own git rep in the first place?
Simply execute:

mkdir new-rep-dir
cd new-rep-dir
git init-db

and the new-rep-dir is a git repository

Hint by TZ: git init is the alias for git init-db