Leandro Lucarella wrote:
"Jérôme M. Berger", el 3 de junio a las 22:24 me escribiste:Commit ======Git has three ways to commit files to the repository: - Commit everything with "git commit -a"; - Commit only some files with "git commit file1 file2...";- The staging area. This allows you to specify which files (or which changes) you want to commit using "git add" before doing the actual commit with "git commit". This is nice for some complicated situations, but I feel that it is not that common.The truth is Git supports just one way to commit stuff and it's always through the staging area. git commit -a and git commit f1 f2 ... are just shortcuts for git add [every "dirty" file] && git commit and git add f1 f2 ... && git commit respectively.
That's an implementation detail. From the user's point of view, they introduce different workflow (which is good: more flexibility is better so long as it doesn't add undue complexity, which this doesn't).
That was to deactivate the pager. I had first typed "git log" which showed the pager, then I simply typed the "up" key and added "--no-pager" to the command line, which didn't work and I had to change the command line a third time to get what I wanted (see what I said above about more flexibility being good)- Mercurial and Git both have global options which apply to all commands and specific options that only apply to the current command. With Mercurial, the options may be put in any order, and in particular, you can do "hg cmd <options>". With Git the global options must be put before the command and the specific options must be put after: "git <global options> cmd <specific options>";I never noticed that. I think because I think I never used git "global" options. What are you using?
I'd say "when you understand Git" is the issue. Once you know them, I don't think there's that much difference between Git, Mercurial and Bazaar. The difference is, you don't really need to *know* Mercurial or Bazaar to use them, which makes them a lot easier to learn.- Mercurial command names are much more intuitive (especially coming from cvs/svn). For example, in order to return a modified file to its repository state: "cvs revert", "svn revert", "hg revert", "git checkout". Even in absolute terms, "checkout" is not the first word that comes to mind, I would have understood "revert" (obviously), "restore", "backout" or an extra option to "update" (which Git doesn't have anyway).I think the Git names are right. It's true that it is not intuitive when coming from SVN/CVS, but what you are doing with that command is exactly that. You are checking out the file again (overwriting the current file). When you understand Git, that name makes perfect sense =)
About update, git doesn't have update because you have more flexibility on how to "update" the repo.
"hg update" doesn't update the repo, it updates the working copy. AIUI, git does it with the "merge" command. In absolute terms, I have no problem with this: the Git name makes as much sense as the Mercurial term. However, more than 20 years of SCMs (starting with RCS) have used "update" for that particular command. Using a different name simply makes it harder to learn Git if you have experience of another SCM.
Didn't help, but as I said this is not really an issue with modern disk sizes.Mercurial is also slightly better in terms of disk space used, although this does not mean much given the capacity of today's HDDs.Git have a packing mechanism that is ran when some heuristics detects too much space is wasted. You can try: git gc
Git is supposed to have coloured output, but it wasn't enabled by default and I didn't try to find how to do it. Mercurial has coloured output on Unix, but not on Windows (I have written a patch to allow it to work on Windows but I haven't sent it upstream yet).Mercurial doesn't have coloured output in Unix (at least Debian package 1.2.1). How can I turn it on?
Enable the "color" extension (it's one of the standard extensions, so you only need to add "hgext.color=" to the "[extensions]" section of your hgrc, no need to install anything).
Jerome -- mailto:jeber...@free.fr http://jeberger.free.fr Jabber: jeber...@jabber.fr
signature.asc
Description: OpenPGP digital signature