1. 09 10月, 2020 1 次提交
  2. 02 4月, 2019 1 次提交
    • N
      doc: promote "git switch" · 328c6cb8
      Nguyễn Thái Ngọc Duy 提交于
      The new command "git switch" is added to avoid the confusion of
      one-command-do-all "git checkout" for new users. They are also helpful
      to avoid ambiguation context.
      
      For these reasons, promote it everywhere possible. This includes
      documentation, suggestions/advice from other commands...
      
      The "Checking out files" progress line in unpack-trees.c is also updated
      to "Updating files" to be neutral to both git-checkout and git-switch.
      Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      328c6cb8
  3. 04 6月, 2018 1 次提交
  4. 01 6月, 2018 1 次提交
  5. 02 5月, 2018 1 次提交
    • N
      doc: keep first level section header in upper case · 76a8788c
      Nguyễn Thái Ngọc Duy 提交于
      When formatted as a man page, 1st section header is always in upper
      case even if we write it otherwise. Make all 1st section headers
      uppercase to keep it close to the final output.
      
      This does affect html since case is kept there, but I still think it's
      a good idea to maintain a consistent style for 1st section headers.
      
      Some sections perhaps should become second sections instead, where
      case is kept, and for better organization. I will update if anyone has
      suggestions about this.
      
      While at there I also make some header more consistent (e.g. examples
      vs example) and fix a couple minor things here and there.
      Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      76a8788c
  6. 10 2月, 2018 1 次提交
    • Æ
      git remote doc: correct dangerous lies about what prune does · d0e07472
      Ævar Arnfjörð Bjarmason 提交于
      The "git remote prune <name>" command uses the same machinery as "git
      fetch <name> --prune", and shares all the same caveats, but its
      documentation has suggested that it'll just "delete stale
      remote-tracking branches under <name>".
      
      This isn't true, and hasn't been true since at least v1.8.5.6 (the
      oldest version I could be bothered to test).
      
      E.g. if "refs/tags/*:refs/tags/*" is explicitly set in the refspec of
      the remote, it'll delete all local tags <name> doesn't know about.
      
      Instead, briefly give the reader just enough of a hint that this
      option might constitute a shotgun aimed at their foot, and point them
      to the new PRUNING section in the git-fetch documentation which
      explains all the nuances of what this facility does.
      
      See "[BUG] git remote prune removes local tags, depending on fetch
      config" (CACi5S_39wNrbfjLfn0xhCY+uewtFN2YmnAcRc86z6pjUTjWPHQ@mail.gmail.com)
      by Michael Giuffrida for the initial report.
      Reported-by: NMichael Giuffrida <michaelpg@chromium.org>
      Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d0e07472
  7. 28 6月, 2016 1 次提交
  8. 23 10月, 2015 1 次提交
  9. 18 9月, 2015 1 次提交
  10. 03 3月, 2015 1 次提交
  11. 30 1月, 2015 1 次提交
    • J
      Documentation/git-remote.txt: stress that set-url is not for triangular · 697f6528
      Junio C Hamano 提交于
      It seems to be a common mistake to try using a single remote
      (e.g. 'origin') to fetch from one place (i.e. upstream) while
      pushing to another (i.e. your publishing point).
      
      That will never work satisfactorily, and it is easy to understand
      why if you think about what refs/remotes/origin/* would mean in such
      a world.  It fundamentally cannot reflect the reality.  If it
      follows the state of your upstream, it cannot match what you have
      published, and vice versa.
      
      It may be that misinformation is spread by some people.  Let's
      counter them by adding a few words to our documentation.
      
       - The description was referring to <oldurl> and <newurl>, but never
         mentioned <name> argument you give from the command line.  By
         mentioning "remote <name>", stress the fact that it is configuring
         a single remote.
      
       - Add a reminder that explicitly states that this is about a single
         remote, which the triangular workflow is not about.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      697f6528
  12. 12 2月, 2014 1 次提交
  13. 28 9月, 2013 1 次提交
  14. 23 6月, 2013 1 次提交
  15. 18 5月, 2013 1 次提交
  16. 25 4月, 2013 1 次提交
  17. 07 9月, 2012 1 次提交
  18. 27 4月, 2012 1 次提交
    • J
      docs: stop using asciidoc no-inline-literal · 6cf378f0
      Jeff King 提交于
      In asciidoc 7, backticks like `foo` produced a typographic
      effect, but did not otherwise affect the syntax. In asciidoc
      8, backticks introduce an "inline literal" inside which markup
      is not interpreted. To keep compatibility with existing
      documents, asciidoc 8 has a "no-inline-literal" attribute to
      keep the old behavior. We enabled this so that the
      documentation could be built on either version.
      
      It has been several years now, and asciidoc 7 is no longer
      in wide use. We can now decide whether or not we want
      inline literals on their own merits, which are:
      
        1. The source is much easier to read when the literal
           contains punctuation. You can use `master~1` instead
           of `master{tilde}1`.
      
        2. They are less error-prone. Because of point (1), we
           tend to make mistakes and forget the extra layer of
           quoting.
      
      This patch removes the no-inline-literal attribute from the
      Makefile and converts every use of backticks in the
      documentation to an inline literal (they must be cleaned up,
      or the example above would literally show "{tilde}" in the
      output).
      
      Problematic sites were found by grepping for '`.*[{\\]' and
      examined and fixed manually. The results were then verified
      by comparing the output of "html2text" on the set of
      generated html pages. Doing so revealed that in addition to
      making the source more readable, this patch fixes several
      formatting bugs:
      
        - HTML rendering used the ellipsis character instead of
          literal "..." in code examples (like "git log A...B")
      
        - some code examples used the right-arrow character
          instead of '->' because they failed to quote
      
        - api-config.txt did not quote tilde, and the resulting
          HTML contained a bogus snippet like:
      
            <tt><sub></tt> foo <tt></sub>bar</tt>
      
          which caused some parsers to choke and omit whole
          sections of the page.
      
        - git-commit.txt confused ``foo`` (backticks inside a
          literal) with ``foo'' (matched double-quotes)
      
        - mentions of `A U Thor <author@example.com>` used to
          erroneously auto-generate a mailto footnote for
          author@example.com
      
        - the description of --word-diff=plain incorrectly showed
          the output as "[-removed-] and {added}", not "{+added+}".
      
        - using "prime" notation like:
      
            commit `C` and its replacement `C'`
      
          confused asciidoc into thinking that everything between
          the first backtick and the final apostrophe were meant
          to be inside matched quotes
      
        - asciidoc got confused by the escaping of some of our
          asterisks. In particular,
      
            `credential.\*` and `credential.<url>.\*`
      
          properly escaped the asterisk in the first case, but
          literally passed through the backslash in the second
          case.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6cf378f0
  19. 20 2月, 2012 1 次提交
  20. 24 6月, 2011 1 次提交
    • J
      git-remote.txt: avoid sounding as if loose refs are the only ones in the world · 0aceb220
      Junio C Hamano 提交于
      It was correct to say "The file $GIT_DIR/refs/heads/master stores the
      commit object name at the tip of the master branch" in the older days,
      but not anymore, as refs can be packed into $GIT_DIR/packed-refs file.
      
      Update the document to talk in terms of a more abstract concept "ref" and
      "symbolic ref" where we are not describing the underlying implementation
      detail.
      
      This on purpose leaves two instances of $GIT_DIR/ in the git-remote
      documentation; they do talk about $GIT_DIR/remotes/ and $GIT_DIR/branches/
      file hierarchy that used to be the place to store configuration around
      remotes before the configuration mechanism took them over.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0aceb220
  21. 23 6月, 2011 1 次提交
  22. 31 3月, 2011 2 次提交
    • J
      remote: deprecate --mirror · 09902486
      Jeff King 提交于
      The configuration created by plain --mirror is dangerous and
      useless, and we now have --mirror=fetch and --mirror=push to
      replace it. Let's warn the user.
      
      One alternative to this is to try to guess which type the
      user wants. In a non-bare repository, a fetch mirror doesn't
      make much sense, since it would overwrite local commits. But
      in a bare repository, you might use either type, or even
      both (e.g., if you are acting as an intermediate drop-point
      across two disconnected networks).
      
      So rather than try for complex heuristics, let's keep it
      simple. The user knows what they're trying to do, so let
      them tell us.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      09902486
    • J
      remote: separate the concept of push and fetch mirrors · a9f5a355
      Jeff King 提交于
      git-remote currently has one option, "--mirror", which sets
      up mirror configuration which can be used for either
      fetching or pushing. It looks like this:
      
        [remote "mirror"]
          url = wherever
          fetch = +refs/*:refs/*
          mirror = true
      
      However, a remote like this can be dangerous and confusing.
      Specifically:
      
        1. If you issue the wrong command, it can be devastating.
           You are not likely to "push" when you meant to "fetch",
           but "git remote update" will try to fetch it, even if
           you intended the remote only for pushing. In either
           case, the results can be quite destructive. An
           unintended push will overwrite or delete remote refs,
           and an unintended fetch can overwrite local branches.
      
        2. The tracking setup code can produce confusing results.
           The fetch refspec above means that "git checkout -b new
           master" will consider refs/heads/master to come from
           the remote "mirror", even if you only ever intend to
           push to the mirror. It will set up the "new" branch to
           track mirror's refs/heads/master.
      
        3. The push code tries to opportunistically update
           tracking branches. If you "git push mirror foo:bar",
           it will see that we are updating mirror's
           refs/heads/bar, which corresponds to our local
           refs/heads/bar, and will update our local branch.
      
      To solve this, we split the concept into "push mirrors" and
      "fetch mirrors". Push mirrors set only remote.*.mirror,
      solving (2) and (3), and making an accidental fetch write
      only into FETCH_HEAD. Fetch mirrors set only the fetch
      refspec, meaning an accidental push will not force-overwrite
      or delete refs on the remote end.
      
      The new syntax is "--mirror=<fetch|push>". For
      compatibility, we keep "--mirror" as-is, setting up both
      types simultaneously.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a9f5a355
  23. 11 3月, 2011 1 次提交
    • J
      doc: drop author/documentation sections from most pages · 48bb914e
      Jeff King 提交于
      The point of these sections is generally to:
      
        1. Give credit where it is due.
      
        2. Give the reader an idea of where to ask questions or
           file bug reports.
      
      But they don't do a good job of either case. For (1), they
      are out of date and incomplete. A much more accurate answer
      can be gotten through shortlog or blame.  For (2), the
      correct contact point is generally git@vger, and even if you
      wanted to cc the contact point, the out-of-date and
      incomplete fields mean you're likely sending to somebody
      useless.
      
      So let's drop the fields entirely from all manpages except
      git(1) itself. We already point people to the mailing list
      for bug reports there, and we can update the Authors section
      to give credit to the major contributors and point to
      shortlog and blame for more information.
      
      Each page has a "This is part of git" footer, so people can
      follow that to the main git manpage.
      48bb914e
  24. 04 11月, 2010 2 次提交
  25. 09 10月, 2010 2 次提交
  26. 20 5月, 2010 1 次提交
  27. 20 4月, 2010 1 次提交
  28. 19 1月, 2010 1 次提交
  29. 10 1月, 2010 1 次提交
    • T
      Documentation: spell 'git cmd' without dash throughout · 0b444cdb
      Thomas Rast 提交于
      The documentation was quite inconsistent when spelling 'git cmd' if it
      only refers to the program, not to some specific invocation syntax:
      both 'git-cmd' and 'git cmd' spellings exist.
      
      The current trend goes towards dashless forms, and there is precedent
      in 647ac702 (git-svn.txt: stop using dash-form of commands.,
      2009-07-07) to actively eliminate the dashed variants.
      
      Replace 'git-cmd' with 'git cmd' throughout, except where git-shell,
      git-cvsserver, git-upload-pack, git-receive-pack, and
      git-upload-archive are concerned, because those really live in the
      $PATH.
      0b444cdb
  30. 21 11月, 2009 1 次提交
  31. 11 8月, 2009 1 次提交
  32. 08 4月, 2009 1 次提交
  33. 05 4月, 2009 1 次提交
  34. 28 2月, 2009 1 次提交
  35. 12 11月, 2008 1 次提交
  36. 06 11月, 2008 1 次提交
  37. 06 7月, 2008 1 次提交