Using GIT with Zet

From Zet
Jump to: navigation, search

GIT is the source control management system that Zet uses. This source control system is also used in very big projects like the Linux kernel, GNOME desktop or the server.

GIT is available in multiple platforms, like Linux or Windows. See the GIT website for more information.

Configuring GIT

I have this ~/.gitconfig configuration:

  name = Zeus Gómez Marmolejo
  email =
  ui = true
[color "branch"]
  current = yellow reverse
  local = yellow
  remote = green
[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold
  whitespace = red reverse
[color "status"]
  added = yellow
  changed = green
  untracked = cyan
  st = status
  ci = commit
  br = branch
  co = checkout
  df = diff
  lg = log -p
  lol = log --graph --decorate --pretty=oneline --abbrev-commit
  lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
  ls = ls-files -cdtmok
  dt = diff-tree -r --abbrev

Getting the source code

Once GIT is installed in your system, you can checkout the latest repository version of the source code:

git clone git://

Now, you will have a directory named zet which contains all the latest development tree. Now you can begin editing files and making your changes. You can read the GIT tutorial to see which GIT commands may help you in the development process.

Commiting your changes

When you are done with your changes, you must be sure that they are working and fully tested. Also, that you don't break anything with your changes!!

Now it's time to commit your changes. First, review which files have been modified and which ones you may have added to the tree:

git status

For all modified and new files that you want to add, you have to do a:

git add file1
git add dir/file2

And then finally:

git commit

When the editor appears, simply write a message explaining your modifications.

You can repeat this process several times, doing several commits.

Sending your contributions

When you are done and want to send your contributions, just execute this command (if you did 1 commit):

git format-patch -1

The number 1 indicates the number of commits you did. If you did 3 commits, this command becomes:

git format-patch -3

In the later case, three files will be generated in the same directory, for example: 0001-something.patch, 0002-blabla.patch etc. Simply post them in the forums in a new thread named [PATCH] and a small description. After a brief review of the code, they will be included in the main tree.