Git in two minutes for CVS users [was: Re: Moving xlibs modules to xorg]

Josh Triplett josh at freedesktop.org
Wed Mar 8 02:53:35 PST 2006


Daniel Stone wrote:
> On Sun, Mar 05, 2006 at 02:42:47PM -0800, Keith Packard wrote:
>>On Sun, 2006-03-05 at 23:14 +0200, Daniel Stone wrote:
>>>So, for a small win in being able to
>>>be more careless with branching and merging, we lose the familiarity of
>>>CVS -- I still have not seen any compelling 'this is how you manage your
>>>normal workflow with git' tutorials[0]
>>
>>Then you haven't looked very hard; there are lots of those available on
>>the net, and I've given two presentations on precisely this topic, one
>>at a conference you attended.
> 
> There's no concise git-in-two-minutes I can refer back to from that.

Git in two minutes for CVS users (from my initial summary to the XCB
list, which in turn came from Keith and Carl's GIT tutorial at the
Portland development meeting):

cvs checkout ... -> git-clone git+ssh://git.freedesktop.org/git/xcb
cvs add file -> git-add file
cvs status -> git-status -a
cvs diff -> git-status -a -v
cvs commit -> git-commit -a , then git-push origin
cvs update -> git-pull

Also, you can run "gitk" for a convenient view of the repository, and
"gitk --all" for a view including all branches rather than just the
current branch.

Advanced git features in an additional two minutes:

To branch, use "git checkout -b newbranchname commit-identifier";
commit-identifier can be omitted to mean the current point.  To switch
branches, use "git checkout branchname".  To see the current branch, use
"git branch".  To merge a branch, "git pull . branchname" (substitute a
repository for "." to merge from a remote branch).  To push a branch,
use "git push origin branchname", or use "git push origin" to push all
branches present in both your repository and the origin repository.

To track down a bug, use "git bisect".  Start with "git bisect bad
someversion" and "git bisect good someversion", where "someversion" is a
commit SHA1, tag, or branch.  Git will then sequentially hand you trees
to test; after each test, answer with "git bisect bad" or "git bisect
good".  When done you'll be on the exact commit which includes the bug;
use "git bisect visualize" to see the bisection progress in gitk.


All of that is currently available on the XCB wiki
<http://xcb.freedesktop.org>; it should probably move to a canonical
home on the main freedesktop.org wiki.

> [0]: 'But someone else will build a wrapper around it in the grim
>      meathook future' is a cop-out in UI design, not some kind of
>      inspired masterstroke.

The wrappers already exist.  The main UI issue, in my opinion, is that
there isn't a clear separation from a user point of view between the
wrapper and the underlying commands.  Thus the need for tutorials, to
point out the commands you will normally want to use.

- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20060308/5e16a9f0/attachment.pgp>


More information about the xorg mailing list