Re: as promised, docs: git for the confused

From: Junio C Hamano <junkio@cox.net>
Date: 2005-12-10 10:23:49
linux@horizon.com writes:

> Some users want to track someone else's repository.
> Others...

Exactly.  That's why task oriented list would be most useful.
Here is a starter.


Everyday GIT Cheat Sheet Or Git With 20 Commands
================================================

Repository Administration
-------------------------

  * "init-db" or "clone" to create the initial repository.
  * hooks.
    - public accessible via dumb protocols: need
      update-server-info in hooks/post-update
    - CVS style shared repository: see howto/update-hook-example
      for ideas on branch head policy
  * "fsck-objects", "repack" and "prune".


Individual Developer
--------------------

Standalone tasks

  * "show-branch" or "gitk" to see where you are.
  * "diff" or "status" to see what you are in the middle of.
  * "log" to see what happened.
  * "whatchanged" to find out where things come from.
  * "checkout" and "checkout -b" to switch branches.
  * "commit" to advance the current branch head.
  * "reset" to undo unpublished changes.
  * "checkout -- path" to undo working tree chanegs.
  * "pull ." to merge between branches.
  * "rebase" to maintain topic branches.
  * "fsck-objects", "repack" and "prune".

Working as a participant

  * all the commands useful for standalone individual developer tasks.
  * "pull origin" to keep up-to-date.
  * "push upstream" in CVS style shared repository workflow.
  * "format-patch" in kernel style public forum workflow.

Integrator
----------

  * all the commands useful for standalone individual developer tasks.
  * "am" to apply patches.
  * "pull somewhere-else" to merge from trusted lieutenants.
  * "format-patch" to send suggested alternative to contributors.
  * "revert" to undo botched changes.
  * "push public" to publish the results.


It might be surprising that only handful commands are of
everyday use among 100+, but the ones listed above are the only
ones I use every day.  The exact number depends on how you count
multi-purpose commands like "checkout" and "pull", but only
these need to be learned to play all roles listed above.

	am
	checkout
	checkout -- path
	checkout -b
	commit
	diff
	fetch
	format-patch
	fsck-objects
	gitk
	init-db
	log
	prune
	pull .
	pull other
	push
	rebase
	repack
	reset
	revert
	show-branch
	status
	whatchanged

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Dec 10 10:24:53 2005

This archive was generated by hypermail 2.1.8 : 2005-12-10 10:25:00 EST