summaryrefslogtreecommitdiff
path: root/Documentation/git-clone.txt
AgeCommit message (Collapse)AuthorFilesLines
2013-07-12git-clone.txt: remove the restriction on pushing from a shallow cloneLibravatar Nguyễn Thái Ngọc Duy1-5/+7
The document says one cannot push from a shallow clone. But that is not true (maybe it was at some point in the past). The client does not stop such a push nor does it give any indication to the receiver that this is a shallow push. If the receiver accepts it, it's in. Since 52fed6e (receive-pack: check connectivity before concluding "git push" - 2011-09-02), receive-pack is prepared to deal with broken push, a shallow push can't cause any corruption. Update the document to reflect that. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-22Documentation: Update 'linux-2.6.git' -> 'linux.git'Libravatar W. Trevor King1-2/+2
The 3.x tree has been out for a while now. The -2.6 repository name survived the initial release [1], but kernel.org now only lists 'linux.git' (for aegl as well as torvalds) [2]. [1]: http://article.gmane.org/gmane.linux.kernel/1147422 On 2011-05-30 01:47:57 GMT, Linus Torvalds wrote: > ... yes, that means that my git tree is still called > "linux-2.6.git" on kernel.org. [2]: http://git.kernel.org/cgit/ Signed-off-by: W. Trevor King <wking@tremily.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-22doc/clone: Pick more compelling paths for the --reference exampleLibravatar W. Trevor King1-4/+4
There may be times when using one of your local repositories as a reference for a new clone make sense, but the implied version-bump in the old example isn't one of them. I think a more intuitive example is multi-user system with a central reference clone, and the new paths hint at this use case. Signed-off-by: W. Trevor King <wking@tremily.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-22doc/clone: Remove the '--bare -l -s' exampleLibravatar W. Trevor King1-7/+0
There are other examples in git-clone.txt demonstrating both '--bare' and '-l -s'. Signed-off-by: W. Trevor King <wking@tremily.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17documentation: trivial style cleanupsLibravatar Felipe Contreras1-2/+2
White-spaces, missing braces, standardize --[no-]foo. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01Documentation: the name of the system is 'Git', not 'git'Libravatar Thomas Ackermann1-7/+7
Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01Documentation: avoid poor-man's small caps GITLibravatar Thomas Ackermann1-1/+1
In the earlier days, we used to spell the name of the system as GIT, to simulate as if it were typeset with capital G and IT in small caps. Later we stopped doing so at around 1.6.5 days. Let's stop doing so throughout the documentation. The name to refer to the whole system (and the concept it embodies) is "Git"; the command end-users type is "git". And document this in the coding guideline. Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-25Documentation: remote tracking branch -> remote-tracking branchLibravatar Matthieu Moy1-2/+2
This change was already done by 0e615b252f3 (Matthieu Moy, Tue Nov 2 2010, Replace "remote tracking" with "remote-tracking"), but new instances of remote tracking (without dash) were introduced in the meantime. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Jeff King <peff@peff.net>
2012-10-08Merge branch 'rt/maint-clone-single' into maintLibravatar Junio C Hamano1-4/+11
A repository created with "git clone --single" had its fetch refspecs set up just like a clone without "--single", leading the subsequent "git fetch" to slurp all the other branches, defeating the whole point of specifying "only this branch". * rt/maint-clone-single: clone --single: limit the fetch refspec to fetched branch
2012-09-20clone --single: limit the fetch refspec to fetched branchLibravatar Ralf Thielow1-4/+11
After running "git clone --single", the resulting repository has the usual default "+refs/heads/*:refs/remotes/origin/*" wildcard fetch refspec installed, which means that a subsequent "git fetch" will end up grabbing all the other branches. Update the fetch refspec to cover only the singly cloned ref instead to correct this. That means: If "--single" is used without "--branch" or "--mirror", the fetch refspec covers the branch on which remote's HEAD points to. If "--single" is used with "--branch", it'll cover only the branch specified in the "--branch" option. If "--single" is combined with "--mirror", then it'll cover all refs of the cloned repository. If "--single" is used with "--branch" that specifies a tag, then it'll cover only the ref for this tag. Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-30clone: allow --no-local to turn off local optimizationsLibravatar Jeff King1-1/+3
This is basically the same as using "file://", but is a little less subtle for the end user. It also allows relative paths to be specified. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-30docs/clone: mention that --local may be ignoredLibravatar Jeff King1-7/+10
The --local flag is not "treat this like a local repository", but rather "if we are local, turn on optimizations". Therefore it does nothing in the case of: git clone --local file:///path/to/repo Let's make that more clear in the documentation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-16clone: allow --branch to take a tagLibravatar Nguyễn Thái Ngọc Duy1-2/+3
Because a tag ref cannot be put to HEAD, HEAD will become detached. This is consistent with "git checkout <tag>". This is mostly useful in shallow clone, where it allows you to clone a tag in addtion to branches. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-08clone: add --single-branch to fetch only one branchLibravatar Nguyễn Thái Ngọc Duy1-1/+10
When --single-branch is given, only one branch, either HEAD or one specified by --branch, will be fetched. Also only tags that point to the downloaded history are fetched. This helps most in shallow clones, where it can reduce the download to minimum and that is why it is enabled by default when --depth is given. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22clone: accept config options on the command lineLibravatar Jeff King1-0/+11
Clone does all of init, "remote add", fetch, and checkout without giving the user a chance to intervene and set any configuration. This patch allows you to set config options in the newly created repository after the clone, but before we do any other operations. In many cases, this is a minor convenience over something like: git clone git://... git config core.whatever true But in some cases, it can bring extra efficiency by changing how the fetch or checkout work. For example, setting line-ending config before the checkout avoids having to re-checkout all of the contents with the correct line endings. It also provides a mechanism for passing information to remote helpers during a clone; the helpers may read the git config to influence how they operate. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-25init/clone: remove short option -L and document --separate-git-dirLibravatar Nguyen Thai Ngoc Duy1-2/+1
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-19init, clone: support --separate-git-dir for .git fileLibravatar Nguyễn Thái Ngọc Duy1-0/+10
--separate-git-dir tells git to create git dir at the specified location, instead of where it is supposed to be. A .git file that points to that location will be put in place so that it appears normal to repo discovery process. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-11doc: drop author/documentation sections from most pagesLibravatar Jeff King1-11/+0
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.
2010-11-29Merge branch 'jl/clone-recurse-sm-synonym'Libravatar Junio C Hamano1-1/+3
* jl/clone-recurse-sm-synonym: clone: Add the --recurse-submodules option as alias for --recursive
2010-11-05clone: Add the --recurse-submodules option as alias for --recursiveLibravatar Jens Lehmann1-1/+3
Since 1.6.5 "git clone" honors the --recursive option to recursively check out submodules too. As this option can easily be misinterpreted when it is added to other commands like "git grep", add the new --recurse-submodules option as an alias for --recursive so the same option can be used for all commands recursing into submodules. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03Change incorrect uses of "remote branch" meaning "remote-tracking"Libravatar Matthieu Moy1-1/+1
"remote branch" is a branch hosted in a remote repository, while "remote-tracking branch" is a copy of such branch, hosted locally. The distinction is subtle when the copy is up-to-date, but rather fundamental to understand what "git fetch" and "git push" do. This patch should fix all incorrect usages in Documentation/ directory. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-06Documentation/git-clone: describe --mirror more verboselyLibravatar Uwe Kleine-König1-1/+6
Some people in #linux-rt noticed that describing what "--mirror" option does with "it mirrors" is way insufficient. Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Darren 'Some People' Hart <darren@dvhart.com> Cc: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-21Sync with Git 1.7.0.3Libravatar Junio C Hamano1-5/+5
* maint: Git 1.7.0.3 .mailmap: Map the the first submissions of MJG by e-mail Documentation/git-clone: Transform description list into item list Documentation/urls: Remove spurious example markers Documentation/gitdiffcore: Remove misleading date in heading Documentation/git-reflog: Fix formatting of command lists
2010-03-21Merge branch 'maint-1.6.6' into maintLibravatar Junio C Hamano1-5/+5
* maint-1.6.6: Documentation/git-clone: Transform description list into item list Documentation/urls: Remove spurious example markers Documentation/gitdiffcore: Remove misleading date in heading Documentation/git-reflog: Fix formatting of command lists
2010-03-21Documentation/git-clone: Transform description list into item listLibravatar Michael J Gruber1-5/+5
so that the list of examples is formatted in the same way as for git-fetch, and, more importantly, the different identation for the code blocks in the examples (compared to the immediately preceding code blocks from url.txt) doesn't look like misformatted, but is clarified by the items' bullets. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-15Merge branch 'tc/transport-verbosity'Libravatar Junio C Hamano1-1/+2
* tc/transport-verbosity: transport: update flags to be in running order fetch and pull: learn --progress push: learn --progress transport->progress: use flag authoritatively clone: support multiple levels of verbosity push: support multiple levels of verbosity fetch: refactor verbosity option handling into transport.[ch] Documentation/git-push: put --quiet before --verbose Documentation/git-pull: put verbosity options before merge/fetch ones Documentation/git-clone: mention progress in -v Conflicts: transport.h
2010-03-10Merge branch 'sd/init-template'Libravatar Junio C Hamano1-2/+1
* sd/init-template: wrap-for-bin: do not export an empty GIT_TEMPLATE_DIR t/t0001-init.sh: add test for 'init with init.templatedir set' init: having keywords without value is not a global error. Add a "TEMPLATE DIRECTORY" section to git-init[1]. Add `init.templatedir` configuration variable.
2010-02-24Documentation/git-clone: mention progress in -vLibravatar Tay Ray Chuan1-1/+2
After 5a518ad (clone: use --progress to force progress reporting), -v/--verbose did not affect whether progress status was reported to stderr, and users accustomed to using -v to do so since 21188b1 (Implement git clone -v) may be confused. Mitigate such risks by stating -v does not affect progress in the documentation. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17docs: don't talk about $GIT_DIR/refs/ everywhereLibravatar Jeff King1-1/+1
It is misleading to say that we pull refs from $GIT_DIR/refs/*, because we may also consult the packed refs mechanism. These days we tend to treat the "refs hierarchy" as more of an abstract namespace that happens to be represented as $GIT_DIR/refs. At best, this is a minor inaccuracy, but at worst it can confuse users who then look in $GIT_DIR/refs and find that it is missing some of the refs they expected to see. This patch drops most uses of "$GIT_DIR/refs/*", changing them into just "refs/*", under the assumption that users can handle the concept of an abstract refs namespace. There are a few things to note: - most cases just dropped the $GIT_DIR/ portion. But for cases where that left _just_ the word "refs", I changed it to "refs/" to help indicate that it was a hierarchy. I didn't do the same for longer paths (e.g., "refs/heads" remained, instead of becoming "refs/heads/"). - in some cases, no change was made, as the text was explicitly about unpacked refs (e.g., the discussion in git-pack-refs). - In some cases it made sense instead to note the existence of packed refs (e.g., in check-ref-format and rev-parse). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17Add a "TEMPLATE DIRECTORY" section to git-init[1].Libravatar Steven Drake1-2/+1
Create a more inoformative section to describe template directory and refer to it in config.txt and with the '--template' option of git-init and git-clone commands. Signed-off-by: Steven Drake <sdrake@xnet.co.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-28clone: use --progress to force progress reportingLibravatar Tay Ray Chuan1-0/+3
Follow the argument convention of git-pack-objects, such that a separate option (--preogress) is used to force progress reporting instead of -v/--verbose. -v/--verbose now does not force progress reporting. Make git-clone.txt say so. This should cover all the bases in 21188b1 (Implement git clone -v), which implemented the option to force progress reporting. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-28git-clone.txt: reword description of progress behaviourLibravatar Tay Ray Chuan1-3/+6
Mention progress reporting behaviour in the descriptions for -q/ --quiet and -v/--verbose options, in the style of git-pack-objects.txt. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-28check stderr with isatty() instead of stdout when deciding to show progressLibravatar Tay Ray Chuan1-1/+1
Make transport code (viz. transport.c::fetch_refs_via_pack() and transport-helper.c::standard_options()) that decides to show progress check if stderr is a terminal, instead of stdout. After all, progress reports (via the API in progress.[ch]) are sent to stderr. Update the documentation for git-clone to say "standard error" as well. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-30Documentation: Document --branch option in git clone synopsisLibravatar David Soria Parra1-1/+1
Document the --branch option as [-b <name>] in git clones synopsis. Signed-off-by: David Soria Parra <dsp@php.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21git-clone.txt: Fix grammar and formattingLibravatar Björn Gustavsson1-13/+13
Add the missing definite article ("the") in several places. Change "note to..." to "note for...", since "note to" means that that the note is addressed to someone (source: Google search). Change "progressbar" to "progress bar" (source: Wikipedia). Format git commands, options, and file names consistently using back quotes (i.e. a fixed font in the resulting HTML document). Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Documentation: clone: clarify discussion of initial branchLibravatar Jonathan Nieder1-2/+3
When saying the initial branch is equal to the currently active remote branch, it is probably intended that the branch heads point to the same commit. Maybe it would be more useful to a new user to emphasize that the tree contents and history are the same. More important, probably, is that this new branch is set up so that "git pull" merges changes from the corresponding remote branch. The next paragraph addresses that directly. What the reader needs to know to begin with is that (1) the initial branch is your own; if you do not pull, it won't get updated, and that (2) the initial branch starts out at the same commit as the upstream. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13git-clone doc: typofixLibravatar Johannes Gilger1-1/+1
Signed-off-by: Johannes Gilger <heipei@hackvalue.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-07Merge branch 'jk/clone-b'Libravatar Junio C Hamano1-0/+7
* jk/clone-b: clone: add --branch option to select a different HEAD
2009-09-03Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: git-clone: add missing comma in --reference documentation
2009-09-03Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano1-1/+1
* maint-1.6.3: git-clone: add missing comma in --reference documentation git-cvsserver: no longer use deprecated 'git-subcommand' commands clone: disconnect transport after fetching
2009-09-03Merge branch 'maint-1.6.2' into maint-1.6.3Libravatar Junio C Hamano1-1/+1
* maint-1.6.2: git-clone: add missing comma in --reference documentation clone: disconnect transport after fetching
2009-09-03git-clone: add missing comma in --reference documentationLibravatar Miklos Vajna1-1/+1
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27Merge branch 'jh/submodule-foreach'Libravatar Junio C Hamano1-1/+9
* jh/submodule-foreach: git clone: Add --recursive to automatically checkout (nested) submodules t7407: Use 'rev-parse --short' rather than bash's substring expansion notation git submodule status: Add --recursive to recurse into nested submodules git submodule update: Introduce --recursive to update nested submodules git submodule foreach: Add --recursive to recurse into nested submodules git submodule foreach: test access to submodule name as '$name' Add selftest for 'git submodule foreach' git submodule: Cleanup usage string and add option parsing to cmd_foreach() git submodule foreach: Provide access to submodule name, as '$name' Conflicts: Documentation/git-submodule.txt git-submodule.sh
2009-08-26clone: add --branch option to select a different HEADLibravatar Jeff King1-0/+7
We currently point the HEAD of a newly cloned repo to the same ref as the parent repo's HEAD. While a user can then "git checkout -b foo origin/foo" whichever branch they choose, it is more convenient and more efficient to tell clone which branch you want in the first place. Based on a patch by Kirill A. Korinskiy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-20git clone: Add --recursive to automatically checkout (nested) submodulesLibravatar Johan Herland1-1/+9
Many projects using submodules expect all submodules to be checked out in order to build/work correctly. A common command sequence for developers on such projects is: git clone url/to/project cd project git submodule update --init (--recursive) This patch introduces the --recursive option to git-clone. The new option causes git-clone to recursively clone and checkout all submodules of the cloned project. Hence, the above command sequence can be reduced to: git clone --recursive url/to/project --recursive is ignored if no checkout is done by the git-clone. The patch also includes documentation and a selftest. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-17docs: describe impact of repack on "clone -s"Libravatar Jeff King1-2/+10
The effects of repacking on a repository with alternates are a bit subtle. The two main things users will want are: 1. Not to waste disk space by accidentally copying objects which could be shared. 2. Copying all objects explicitly to break the dependency on the source repo. This patch describes both under the "clone -s" documentation. It makes sense to put it there rather than in git-repack.txt for both cases. For (1), we are warning the user who is using "clone -s" about what _not_ to do, so we need to get their attention when reading about "clone -s". For (2), we are telling them how git-repack can be used to accomplish a task, but until they know that git-repack is the right tool, they have no reason to look at the repack documentation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-09Documentation: cloning to empty directory is allowedLibravatar Alexander Potashev1-1/+1
Cloning into an existing empty directory is now allowed: commit 55892d23981917aefdb387ad7d0429f90cbd446a ("Allow cloning to an existing empty directory") Signed-off-by: Alexander Potashev <aspotashev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-01Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano1-1/+1
* maint-1.6.0: Documentation: Remove an odd "instead"
2009-04-01Documentation: Remove an odd "instead"Libravatar Holger Weiß1-1/+1
Signed-off-by: Holger Weiß <holger@zedat.fu-berlin.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-09Implement git clone -vLibravatar Miklos Vajna1-0/+5
The new -v option forces the progressbar, even in case the output is not a terminal. This can be useful if the caller is an IDE or wrapper which wants to scrape the progressbar from stderr and show its information in a different format. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>