Git Tips

This page presents some commands to use Git as well as possible days after days.

Default configuration
git config --global user.name "Gauthier Quesnel" git config --global user.email quesnel@users.sourceforge.net git config --global core.editor vim
 * To define informations about the current developer:

git config --global color.ui true git config --global color.diff auto git config --global color.status auto git config --global color.branch auto git config --global color.interactive auto
 * To activate colors:

git config --global core.whitespace trailing-space,space-before-tab git config --global apply.whitespace fix
 * To format patch without trailing whitespaces  Not always automatically, but only when formatting :

git config --list
 * To show all configuration parameters:

Commands
git archive --format=tar --prefix=vle-`git describe`/ HEAD | bzip2 > ../vle-`git describe`.tar.bz2
 * To build an archive (tarball) from the current HEAD of the repository:

chgrp -R gitrepo chmod -R g+swX gitrepo git init --shared=group --bare gitrepo chgrp -R the_new_group gitrepo
 * To share a Git repository between multiple users on a machine:
 * 1) The repository already exits
 * 1) The repository does not exist