Notes/Git

edit
revisions

what's new
search
help

kiwi


Early notes

  • git commit requires addition of files to be taken into account when commiting, git commit -a automatically adds the local modifications
  • CLI is verbose, but (usually) gives indications about what to do. The default makes sense for non-automated use... but I don't know how the tools integration is.

See local changes

git whatchanged gives a rather nice output of the version history:

commit 2ed73c689978dd8ea45a70ca974a75448b0cbde5
Author: S<C3><A9>bastien <sebastien@cherry.project-ojibwe.net>
Date:   Wed Oct 31 15:36:07 2007 -0400

    Added documentation, architecture cleanup

:100644 100644 b9b842d... e1a8141... M  Distribution/templating.py
:100644 100644 0dcfefe... fb8d533... M  Sources/templating.spy

where mercurial gives less information

changeset:   28:81aab5323b15
tag:         tip
user:        Sebastien Pierre <sebastien@type-z.org>
date:        Fri Aug 31 12:41:11 2007 -0400
files:       Sources/sdoc/main.py
description:
Updated to latest LambdaFactory interface
tags:        update

(however git log gives about the same)

Nice things

git-whatchanged --since="2 weeks ago" -- gitk

Oddities

git init MyProject? does not work, instead you have to do mkdir MyProject? ; cd MyProject? ; git init-db

git push ssh://server/~me/MyProjects? tells me:

git push ssh://ivy.fr/~sebastien/Projects/Templating                                               
No refs in common and none specified; doing nothing.
fatal: unexpected EOF

doing git push ssh://ivy.fr/~sebastien/Projects/Templating master works:

updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   5038d421da34678d4dd3962bb33bcd7e63a7e605
Generating pack...
Done counting 39 objects.
Deltifying 39 objects...
 100% (39/39) done
Writing 39 objects...
 100% (39/39) done
Total 39 (delta 9), reused 0 (delta 0)
Unpacking 39 objects
refs/heads/master: 0000000000000000000000000000000000000000 -> 5038d421da34678d4dd3962bb33bcd7e63a7e605

Commands

  • init-db
  • add
  • commit-a
  • log, whatchanged
  • push

Vocabulary

  • stage/unstage
  • refs/refspec

Impressions

  • Confusing because of complex terminology and messages which you don't get prior to having read and understood the documentation
  • Usually good command-line interaction, with attention to shell integration
  • Many, many powerful features (maybe too much ;)

Surprises

Here I expected that "push" pushes the latest changes in my repo (by default) instead of having to specify head or --all (and it is not clear what the effect would be).

git push ssh://ivy.fr/~/GitProjects/FileView                                                   (121) 
No refs in common and none specified; doing nothing.
fatal: unexpected EOF
replicant:~/Desktop/FileView >> git push -all ssh://ivy.fr/~/GitProjects/FileView                                              (122) 
usage: git-push [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]
replicant:~/Desktop/FileView >> git push --all ssh://ivy.fr/~/GitProjects/FileView                                             (123) 
updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   19c9b084d62027a6d9adbe7cadf35f128628ce2f
Generating pack...
Done counting 211 objects.
Deltifying 211 objects...
 100% (211/211) done
Writing 211 objects...
Unpacking 211 objects
 100% (211/211) done
Total 211 (delta 27), reused 0 (delta 0)
refs/heads/master: 0000000000000000000000000000000000000000 -> 19c9b084d62027a6d9adbe7cadf35f128628ce2f

Survey: here

last modified on March 27, 2008, at 07:02 PM

© type-z.org and its contributing authors, 2001-2004.
Content is licensed under a Creative Commons License.