* more than 20 commands in everyday.txt
@ 2007-12-19 22:56 Miklos Vajna
2007-12-19 23:23 ` Jakub Narebski
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Miklos Vajna @ 2007-12-19 22:56 UTC (permalink / raw
To: git
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
hi,
this might seem to be a bit bikesheding, but i hope it isn't. today i
teched git to someone who never used any scm so far. i showed him the
"everyday with git" document, as i think it's a great start for newbies.
actually i read it once but it was in the past, now i did it again and i
think there are some commands listed there which is not something we use
"every day". of course it may be only me, that's why i ask. here are the
commands i rarely use and are in everyday.txt:
- git-prune and git-repack: usually i use git-gc only. maybe prune and
repack could be removed from everyday.txt?
- git-show-branch: what about mentioning gitk instead? i think it's much
more used - compared to git-show-branch
what do you think about this? maybe i'm wrong, but if i'm right, then i
would provide a patch to update everyday.txt according to these
suggestions.
thanks,
- VMiklos
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: more than 20 commands in everyday.txt
2007-12-19 22:56 more than 20 commands in everyday.txt Miklos Vajna
@ 2007-12-19 23:23 ` Jakub Narebski
2007-12-20 0:15 ` Junio C Hamano
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jakub Narebski @ 2007-12-19 23:23 UTC (permalink / raw
To: Miklos Vajna; +Cc: git
Miklos Vajna <vmiklos@frugalware.org> writes:
> this might seem to be a bit bikesheding, but i hope it isn't. today i
> teched git to someone who never used any scm so far. i showed him the
> "everyday with git" document, as i think it's a great start for newbies.
> actually i read it once but it was in the past, now i did it again and i
> think there are some commands listed there which is not something we use
> "every day". of course it may be only me, that's why i ask. here are the
> commands i rarely use and are in everyday.txt:
>
> - git-prune and git-repack: usually i use git-gc only. maybe prune and
> repack could be removed from everyday.txt?
I agree that git-repack should be removed (there is git-gc), and
git-prune should be replaced by mentioning --prune option to git-gc.
This document is for newbies, and they shouldn't need to run anything
other than git-gc.
Besides with new enough git the number of generated loose objects
should be greatly reduced: git now produces (small) packs if
possible.
I'm not sure if mentioning git-fsck at all, or at least this early is
a good idea for introductory tutorial. Running git-fsck should be
rare, very rare.
> - git-show-branch: what about mentioning gitk instead? i think it's much
> more used - compared to git-show-branch
I would replace git-show-branch by git-show as command to see where
you are. and add gitk (which has now manpage) to view history.
git-show-branch output is a bit cryptic...
Perhaps we could add git-reflog / "git log -g" somewhere around?
> what do you think about this? maybe i'm wrong, but if i'm right, then i
> would provide a patch to update everyday.txt according to these
> suggestions.
I'd like this. At least the first one is unambiguous.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: more than 20 commands in everyday.txt
2007-12-19 22:56 more than 20 commands in everyday.txt Miklos Vajna
2007-12-19 23:23 ` Jakub Narebski
@ 2007-12-20 0:15 ` Junio C Hamano
2007-12-20 14:05 ` [PATCH] everyday: replace 'prune' with 'gc --prune' Miklos Vajna
2007-12-20 14:05 ` [PATCH] everyday: replace 'repack' with 'gc' Miklos Vajna
3 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2007-12-20 0:15 UTC (permalink / raw
To: Miklos Vajna; +Cc: git
Miklos Vajna <vmiklos@frugalware.org> writes:
> "every day". of course it may be only me, that's why i ask. here are the
> commands i rarely use and are in everyday.txt:
>
> - git-prune and git-repack: usually i use git-gc only. maybe prune and
> repack could be removed from everyday.txt?
>
> - git-show-branch: what about mentioning gitk instead? i think it's much
> more used - compared to git-show-branch
>
> what do you think about this? maybe i'm wrong, but if i'm right, then i
> would provide a patch to update everyday.txt according to these
> suggestions.
I think you would probably get unanimous yes for the former (I don't use
gc myself but "repack -a -d" or "repack -a -d -f" regularly, though ---
I am old fashioned and do not mind being counted as an oddball).
For the latter it all depends on whether you are in windowed environment
(I usually don't).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] everyday: replace 'prune' with 'gc --prune'
2007-12-19 22:56 more than 20 commands in everyday.txt Miklos Vajna
2007-12-19 23:23 ` Jakub Narebski
2007-12-20 0:15 ` Junio C Hamano
@ 2007-12-20 14:05 ` Miklos Vajna
2007-12-20 14:05 ` [PATCH] everyday: replace 'repack' with 'gc' Miklos Vajna
3 siblings, 0 replies; 5+ messages in thread
From: Miklos Vajna @ 2007-12-20 14:05 UTC (permalink / raw
To: Junio C Hamano; +Cc: Miklos Vajna, git
This document is for newcomers, so it's good to mention gc for housekeeping
tasks instead of running prune manually.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
Documentation/everyday.txt | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index ce7c170..a09c1d9 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -30,8 +30,6 @@ Everybody uses these commands to maintain git repositories.
* gitlink:git-fsck[1] to check the repository for errors.
- * gitlink:git-prune[1] to remove unused objects in the repository.
-
* gitlink:git-repack[1] to pack loose objects for efficiency.
* gitlink:git-gc[1] to do common housekeeping tasks such as
@@ -56,13 +54,13 @@ 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> it is easier to use `git gc` than individual housekeeping commands
-such as `prune` and `repack`. This runs `repack -a -d`.
+such as `prune` and `repack`.
Repack a small project into single pack.::
+
------------
$ git repack -a -d <1>
-$ git prune
+$ git gc --prune
------------
+
<1> pack all the objects reachable from the refs into one pack,
@@ -189,7 +187,7 @@ $ git pull <3>
$ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <4>
$ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <5>
$ git reset --hard ORIG_HEAD <6>
-$ git prune <7>
+$ git gc --prune <7>
$ git fetch --tags <8>
------------
+
--
1.5.4.rc0.67.gf9c5-dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] everyday: replace 'repack' with 'gc'
2007-12-19 22:56 more than 20 commands in everyday.txt Miklos Vajna
` (2 preceding siblings ...)
2007-12-20 14:05 ` [PATCH] everyday: replace 'prune' with 'gc --prune' Miklos Vajna
@ 2007-12-20 14:05 ` Miklos Vajna
3 siblings, 0 replies; 5+ messages in thread
From: Miklos Vajna @ 2007-12-20 14:05 UTC (permalink / raw
To: Junio C Hamano; +Cc: Miklos Vajna, git
Most users don't want to run git repack manually, so suggest using gc instead.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
Documentation/everyday.txt | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index a09c1d9..f1993e2 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -30,8 +30,6 @@ Everybody uses these commands to maintain git repositories.
* gitlink:git-fsck[1] to check the repository for errors.
- * gitlink:git-repack[1] to pack loose objects for efficiency.
-
* gitlink:git-gc[1] to do common housekeeping tasks such as
repack and prune.
@@ -43,23 +41,20 @@ Check health and remove cruft.::
------------
$ git fsck <1>
$ git count-objects <2>
-$ git repack <3>
-$ git gc <4>
+$ git gc <3>
------------
+
<1> running without `\--full` is usually cheap and assures the
repository health reasonably well.
<2> check how many loose objects there are and how much
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> it is easier to use `git gc` than individual housekeeping commands
-such as `prune` and `repack`.
+<3> repacks the local repository and performs other housekeeping tasks. Running
+without `--prune` is a safe operation even while other ones are in progress.
Repack a small project into single pack.::
+
------------
-$ git repack -a -d <1>
+$ git gc <1>
$ git gc --prune
------------
+
--
1.5.4.rc0.67.gf9c5-dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-12-20 14:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-19 22:56 more than 20 commands in everyday.txt Miklos Vajna
2007-12-19 23:23 ` Jakub Narebski
2007-12-20 0:15 ` Junio C Hamano
2007-12-20 14:05 ` [PATCH] everyday: replace 'prune' with 'gc --prune' Miklos Vajna
2007-12-20 14:05 ` [PATCH] everyday: replace 'repack' with 'gc' Miklos Vajna
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).