Code

reflog inspection: introduce shortcut "-g"
[git.git] / Documentation / everyday.txt
index 5d17ace721d1ec4c031a4a1f96374559002a93c9..ca36a76da6a28d89d5cc0cba76517de88489048a 100644 (file)
@@ -25,7 +25,7 @@ Basic Repository[[Basic Repository]]
 
 Everybody uses these commands to maintain git repositories.
 
-  * gitlink:git-init-db[1] or gitlink:git-clone[1] to create a
+  * gitlink:git-init[1] or gitlink:git-clone[1] to create a
     new repository.
 
   * gitlink:git-fsck-objects[1] to check the repository for errors.
@@ -34,6 +34,9 @@ Everybody uses these commands to maintain git repositories.
 
   * gitlink:git-repack[1] to pack loose objects for efficiency.
 
+  * gitlink:git-gc[1] to do common housekeeping tasks such as
+    repack and prune.
+
 Examples
 ~~~~~~~~
 
@@ -41,10 +44,9 @@ Check health and remove cruft.::
 +
 ------------
 $ git fsck-objects <1>
-$ git prune
 $ git count-objects <2>
 $ git repack <3>
-$ git prune <4>
+$ git gc <4>
 ------------
 +
 <1> running without `\--full` is usually cheap and assures the
@@ -53,7 +55,8 @@ repository health reasonably well.
 disk space is wasted by not repacking.
 <3> without `-a` repacks incrementally.  repacking every 4-5MB
 of loose objects accumulation may be a good rule of thumb.
-<4> after repack, prune removes the duplicate loose objects.
+<4> it is easier to use `git gc` than individual housekeeping commands
+such as `prune` and `repack`.  This runs `repack -a -d`.
 
 Repack a small project into single pack.::
 +
@@ -104,7 +107,7 @@ Use a tarball as a starting point for a new repository.::
 ------------
 $ tar zxf frotz.tar.gz
 $ cd frotz
-$ git-init-db
+$ git-init
 $ git add . <1>
 $ git commit -m 'import of frotz source tree.'
 $ git tag v2.43 <2>
@@ -145,8 +148,7 @@ modification will be caught if you do `git commit -a` later.
 <8> redo the commit undone in the previous step, using the message
 you originally wrote.
 <9> switch to the master branch.
-<10> merge a topic branch into your master branch.  You can also use
-`git pull . alsa-audio`, i.e. pull from the local repository.
+<10> merge a topic branch into your master branch.
 <11> review commit logs; other forms to limit output can be
 combined and include `\--max-count=10` (show 10 commits),
 `\--until=2005-12-10`, etc.