Git Tips

From VLE

Jump to: navigation, search

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


Default configuration

  • To define informations about the current developer:
git config --global user.name "Gauthier Quesnel"
git config --global user.email quesnel@users.sourceforge.net
git config --global core.editor vim
  • To activate colors:
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 format patch without trailing whitespaces Not always automatically, but only when formatting :
git config --global core.whitespace trailing-space,space-before-tab
git config --global apply.whitespace fix
  • To show all configuration parameters:
git config --list

Commands

  • To build an archive (tarball) from the current HEAD of the repository:
git archive --format=tar --prefix=vle-`git describe`/ HEAD | bzip2 > ../vle-`git describe`.tar.bz2
This page was last modified on 13 February 2012, at 15:23. This page has been accessed 608 times.