Home Home > 2009 > 04 > 15 > Combine osc with git
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Combine osc with git

April 15th, 2009 by

Yesterday Jan-Simon (dl9pf) tells me about an great Program calls “git”. Git is an Version-Administration Program. Anything knows the Problem. We working on an Project into our osc, and 2 Weeks later, we don’t know, what the last changes was. On this place can git help.Now following a short Introducting:

First of all we need an .git Folder. In my case i have all Projects in ~/osc/- As example i’m going to my foo.

$ ~/osc> cd foo
$ ~/osc/foo> git init
Then git says:
Initialized empty Git repository in /home/sascha/osc/foo/.git/

$~/osc/foo> echo 123 > datei1

$~/osc/foo> git add datei1
This adds datei1 to your .git folder. If you use git add * you can add more than one File.

$~/osc/foo> git commit -m”Initial Version” (Or what you want)
git says:
Created initial commit a7458cf: Test
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 datei1

$~/osc/foo> echo 456 > datei2
$~/osc/foo> git commit -m”Change 1″
git says:
Created commit d1ef978: Change 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 datei2
$~/osc/foo> gitk (this is an GUI)

That looks:


There you can find all Changes since “Intial Version”.  Git can also manage branches and can merge it perfectly. So i think that git is very good Tool. And an good completion. With an wrapper file it is also possible to add or remove files in osc and git. Very nice -)

Both comments and pings are currently closed.

2 Responses to “Combine osc with git”

  1. }-Tux-{

    Hmm you can do the same without git – have a look at “osc log” and “osc diff”. The obs backend keeps already track of your changes.

  2. Yes, you’re right. osc log and osc diff are commandline Tools. I would like to see it clean like gitk. There i have an good overview. The present GUI’s are not working for me. MonoOSC is on my PC not for daily working. YABSC at the Moment not runs. I’m searchin for an Solution. So all in all the combine from osc and git is for the best Solution. And with git is an application possible, for example an monitoring of /etc or other locations. So i can use git for more than one Application.