Maxime Chambreuil

Friday April 4, 2008

Tooltips for GIT

Max @ 21:07 | Filed under: Information Technology

GIT

Initialization

$ git config --global user.name "Your Name Comes Here"
$ git config --global user.email you@yourdomain.example.com

Cloning

$ git clone git+ssh://sflphone_org@sflphone.org/git/sflphone.git

Edit .git/config to have :

[remote "origin"]
        url = git+ssh://sflphone_org@sflphone.org/git/sflphone.git
        fetch = +refs/heads/*:refs/remotes/origin/*
        push = +refs/heads/*:refs/remotes/origin/*

Committing and pushing

$ git-gui

Then “Add Existing”, “Commit” and “Push”.

Branching

Create a new branch toto :

$ git branch toto

List all branches :

$ git branch

Switch to branch toto :

$ git checkout toto

Display branches :

$ gitk

Delete branch toto :

$ git branch -d toto

Copyright © Maxime Chambreuil