@matheusbsbs / matheus-bagliano / commits / bce02c1b4d
Fork 0

everyday: fsck and gc are not everyday operations

Back in 2005 when this document was written, it may have made sense to introduce ‘git fsck’ (then ‘git fsck-objects’) as the very first example command for new users of Git 0.99.9. Now that Git has been stable for years and does not actually tend to eat your data, it makes significantly less sense. In fact, it sends an entirely wrong message. ‘git gc’ is also unnecessary for the purposes of this document, especially with gc.auto enabled by default. The only other commands in the “Basic Repository” section were ‘git init’ and ‘git clone’. ‘clone’ is already listed in the “Participant” section, so move ‘init’ to the “Standalone” section and get rid of “Basic Repository” entirely. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Anders Kaseorg committed Oct 21, 2009 at 16:02 UTC bce02c1b4de20de545a2fab899cb96b66e01097d
1 file changed +4 -47
Documentation/everyday.txt
+4 -47
@@ -1,13 +1,8 @@
1 Everyday GIT With 20 Commands Or So
2 ===================================
3
4 -<<Basic Repository>> commands are needed by people who have a
5 -repository --- that is everybody, because every working tree of
6 -git is a repository.
7 -
8 -In addition, <<Individual Developer (Standalone)>> commands are
9 -essential for anybody who makes a commit, even for somebody who
10 -works alone.
4 +<<Individual Developer (Standalone)>> commands are essential for
5 +anybody who makes a commit, even for somebody who works alone.
6
7 If you work with other people, you will need commands listed in
8 the <<Individual Developer (Participant)>> section as well.
@@ -20,46 +15,6 @@ administrators who are responsible for the care and feeding
15 of git repositories.
16
17
23 -Basic Repository[[Basic Repository]]
24 -------------------------------------
25 -
26 -Everybody uses these commands to maintain git repositories.
27 -
28 - * linkgit:git-init[1] or linkgit:git-clone[1] to create a
29 - new repository.
30 -
31 - * linkgit:git-fsck[1] to check the repository for errors.
32 -
33 - * linkgit:git-gc[1] to do common housekeeping tasks such as
34 - repack and prune.
35 -
36 -Examples
37 -~~~~~~~~
38 -
39 -Check health and remove cruft.::
40 -+
41 -------------
42 -$ git fsck <1>
43 -$ git count-objects <2>
44 -$ git gc <3>
45 -------------
46 -+
47 -<1> running without `\--full` is usually cheap and assures the
48 -repository health reasonably well.
49 -<2> check how many loose objects there are and how much
50 -disk space is wasted by not repacking.
51 -<3> repacks the local repository and performs other housekeeping tasks.
52 -
53 -Repack a small project into single pack.::
54 -+
55 -------------
56 -$ git gc <1>
57 -------------
58 -+
59 -<1> pack all the objects reachable from the refs into one pack,
60 -then remove the other packs.
61 -
62 -
18 Individual Developer (Standalone)[[Individual Developer (Standalone)]]
19 ----------------------------------------------------------------------
20
@@ -67,6 +22,8 @@ A standalone individual developer does not exchange patches with
22 other people, and works alone in a single repository, using the
23 following commands.
24
25 + * linkgit:git-init[1] to create a new repository.
26 +
27 * linkgit:git-show-branch[1] to see where you are.
28
29 * linkgit:git-log[1] to see what happened.