aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-add.txt
Commit message (Collapse)AuthorAge
* git-add.txt: fix formatting of --patch sectionStephen Boyd2009-11-14
| | | | | | | Extra paragraphs should be prefixed with a plus sign. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Improve --patch option documentation in git-addJari Aalto2009-09-13
| | | | | Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: add: <filepattern>... is optionalPaul Bolle2009-08-12
| | | | | | | | <filepattern>... is optional (e.g. when the --all or --update options are used) so use square brackets in the synopsis. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/add-edit'Junio C Hamano2009-05-18
|\ | | | | | | | | | | * js/add-edit: t3702: fix reliance on SHELL_PATH being '/bin/sh' git-add: introduce --edit (to edit the diff vs. the index)
| * git-add: introduce --edit (to edit the diff vs. the index)Johannes Schindelin2009-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With "git add -e [<files>]", Git will fire up an editor with the current diff relative to the index (i.e. what you would get with "git diff [<files>]"). Now you can edit the patch as much as you like, including adding/removing lines, editing the text, whatever. Make sure, though, that the first character of the hunk lines is still a space, a plus or a minus. After you closed the editor, Git will adjust the line counts of the hunks if necessary, thanks to the --recount option of apply, and commit the patch. Except if you deleted everything, in which case nothing happens (for obvious reasons). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Update git-add.txt according to the new possibilities of 'git add -p'.Matthieu Moy2009-04-16
| | | | | | | | | | | | | | | | The text is merely cut-and-pasted from git-add--interactive.perl. The cut-and-paste also fixes a typo. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git add -p: new "quit" command at the prompt.Matthieu Moy2009-04-15
|/ | | | | | | | | There's already 'd' to stop staging hunks in a file, but no explicit command to stop the interactive staging (for the current files and the remaining ones). Of course you can do 'd' and then ^C, but it would be more intuitive to allow 'quit' action. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jc/add-p-unquote'Junio C Hamano2009-03-05
|\ | | | | | | | | * jc/add-p-unquote: git-add -i/-p: learn to unwrap C-quoted paths
| * git-add -i/-p: learn to unwrap C-quoted pathsJunio C Hamano2009-02-18
| | | | | | | | | | | | | | | | | | | | The underlying plumbing commands are not run with -z option, so the paths returned from them need to be unquoted as needed. Remove the now stale BUGS section from git-add documentaiton as suggested by Teemu Likonen. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Documentation: minor grammatical fixes.David J. Mellor2009-02-28
|/ | | | | Signed-off-by: David J. Mellor <dmellor@whistlingcat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix typos in the documentation.Ralf Wildenhues2008-11-27
| | | | | Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* document "intent to add" option to git-addJeff King2008-10-20
| | | | | | | This was added by 3942581 but never documented. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-add --all: documentationJunio C Hamano2008-07-19
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make git-add -i accept ranges like 7-Ciaran McCreesh2008-07-15
| | | | | | | | | git-add -i ranges expect number-number. But for the supremely lazy, typing in that second number when selecting "from patch 7 to the end" is wasted effort. So treat an empty second number in a range as "until the last item". Signed-off-by: Ciaran McCreesh <ciaran.mccreesh@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-add--interactive: manual hunk editing modeThomas Rast2008-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | Adds a new option 'e' to the 'add -p' command loop that lets you edit the current hunk in your favourite editor. If the resulting patch applies cleanly, the edited hunk will immediately be marked for staging. If it does not apply cleanly, you will be given an opportunity to edit again. If all lines of the hunk are removed, then the edit is aborted and the hunk is left unchanged. Applying the changed hunk(s) relies on Johannes Schindelin's new --recount option for git-apply. Note that the "real patch" test intentionally uses (echo e; echo n; echo d) | git add -p even though the 'n' and 'd' are superfluous at first sight. They serve to get out of the interaction loop if git add -p wrongly concludes the patch does not apply. Many thanks to Jeff King <peff@peff.net> for lots of help and suggestions. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: be consistent about "git-" versus "git "Jonathan Nieder2008-07-01
| | | | | | | | | | | | | | | | | | | | Since the git-* commands are not installed in $(bindir), using "git-command <parameters>" in examples in the documentation is not a good idea. On the other hand, it is nice to be able to refer to each command using one hyphenated word. (There is no escaping it, anyway: man page names cannot have spaces in them.) This patch retains the dash in naming an operation, command, program, process, or action. Complete command lines that can be entered at a shell (i.e., without options omitted) are made to use the dashless form. The changes consist only of replacing some spaces with hyphens and vice versa. After a "s/ /-/g", the unpatched and patched versions are identical. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: fix links to tutorials and other new manual pagesJonathan Nieder2008-07-01
| | | | | | | | | | | | | | | | | | | With the conversion of HTML documentation to man pages tutorial.html -> gittutorial (7) tutorial-2.html -> gittutorial-2 (7) cvs-migration.html -> gitcvs-migration (7) diffcore.html -> gitdiffcore (7) repository-layout.html -> gitrepository-layout (5) hooks.html -> githooks (5) glossary.html -> gitglossary (7) core-tutorial.html -> gitcore-tutorial (7) and the automatic update of references to these pages, a little debris was left behind. We clear it away. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git add: add long equivalents of '-u' and '-f' optionsSZEDER Gábor2008-06-14
| | | | | | | | | | The option -u stands for --update and it is a good idea to make it clear especially because this is the only mode of operation of "git add" that does something different from "adding". Give longer --force synonym to -f while we are at it as well. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Docs: Use "-l::\n--long\n" format in OPTIONS sectionsStephan Beyer2008-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | The OPTIONS section of a documentation file contains a list of the options a git command accepts. Currently there are several variants to describe the case that different options (almost) do the same in the OPTIONS section. Some are: -f, --foo:: -f|--foo:: -f | --foo:: But AsciiDoc has the special form: -f:: --foo:: This patch applies this form to the documentation of the whole git suite, and removes useless em-dash prevention, so \--foo becomes --foo. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* documentation: move git(7) to git(1)Christian Couder2008-06-06
| | | | | | | | As the "git" man page describes the "git" command at the end-user level, it seems better to move it to man section 1. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* documentation: convert "diffcore" and "repository-layout" to man pagesChristian Couder2008-06-06
| | | | | | | | | | | | | This patch renames the following documents and at the same time converts them to the man format: diffcore.txt -> gitdiffcore.txt (man section 7) repository-layout.txt -> gitrepository-layout.txt (man section 5) Other documents that reference the above ones are changed accordingly. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Manual subsection to refer to other pages is SEE ALSOJunio C Hamano2008-05-28
| | | | | | Consistently say so in all caps as it is customary to do so. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add --ignore-errors to git-add to allow it to skip files with read errorsAlex Riesen2008-05-12
| | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2008-05-08
|\ | | | | | | | | | | * maint: Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull" doc: clarify definition of "update" for git-add -u
| * Merge branch 'maint-1.5.4' into maintJunio C Hamano2008-05-08
| |\ | | | | | | | | | | | | | | | * maint-1.5.4: Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull" doc: clarify definition of "update" for git-add -u
| | * doc: clarify definition of "update" for git-add -uJeff King2008-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "-u" option is described only in terms of "updating" files, which in turn is described only as "similar to what git commit -a does". Let's be a little more specific about what updating entails. Suggested by Geoffrey Irving. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Documentation: improve "add", "pull" and "format-patch" examplesChristian Couder2008-05-06
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch in "git-add.txt" and "git-format-patch.txt", the commands used in the examples were "git-CMD" instead of "git CMD". This patch fixes that. In "git-pull.txt" only the last example had the code sample in an asciidoc "Listing Block", and in the other two files, none. This patch fixes that by putting all code samples in listing blocks. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Describe the bug in handling filenames with funny characters in 'git add -i'Teemu Likonen2008-04-02
|/ | | | | | | | | The interactive mode does not work with files whose names contain characters that need C-quoting. `core.quotepath` configuration can be used to work this limitation around to some degree, but backslash, double-quote and control characters will still have problems. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Minor wording changes in the keyboard descriptions in git-add --interactive.Vineet Kumar2008-03-13
| | | | | | | | The wording of the interactive help text from git-add--interactive.perl is clearer. Just duplicate that text here. Signed-off-by: Vineet Kumar <vineet@doorstop.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Clarified the meaning of git-add -u in the documentationPekka Kaitaniemi2008-02-20
| | | | | | | | | The git-add documentation did not state clearly that the -u switch updates only the tracked files that are in the current directory and its subdirectories. Signed-off-by: Pekka Kaitaniemi <kaitanie@cc.helsinki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: rename gitlink macro to linkgitDan McGee2008-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix mis-markup of the -p, --patch option in git-add(1)Eyvind Bernhardsen2007-12-10
| | | | | | | | An item in a bulletted list in AsciiDoc is followed with two colons, not just one. Signed-off-by: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: add --patch option to synopsis of git-addMatthias Kestenholz2007-12-05
| | | | | Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Document all help keys in "git add -i" patch mode.Ralf Wildenhues2007-11-28
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add "--patch" option to git-add--interactiveWincent Colaiuta2007-11-25
| | | | | | | | | | | | When the "--patch" option is supplied, the patch_update_cmd() function is called bypassing the main_loop() and exits. Seeing as builtin-add is the only caller of git-add--interactive we can impose a strict requirement on the format of the arguments to avoid possible ambiguity: an "--" argument must be used whenever any pathspecs are passed, both with the "--patch" option and without it. Signed-off-by: Wincent Colaiuta <win@wincent.com>
* Merge branch 'maint'Junio C Hamano2007-11-14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: git-clean: honor core.excludesfile Documentation: Fix man page breakage with DocBook XSL v1.72 git-remote.txt: fix typo core-tutorial.txt: Fix argument mistake in an example. replace reference to git-rm with git-reset in git-commit doc Grammar fixes for gitattributes documentation Don't allow fast-import tree delta chains to exceed maximum depth revert/cherry-pick: allow starting from dirty work tree. t/t3404: fix test for a bogus todo file. Conflicts: fast-import.c
| * replace reference to git-rm with git-reset in git-commit docJing Xue2007-11-14
| | | | | | | | | | | | | | | | | | | | The message in git-commit suggesting to use 'git rm --cached' to unstage is just plain wrong. It really should mention 'git reset'. Suggested by Jan Hudec. Signed-off-by: Jing Xue <jingxue@digizenstudio.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Update manpages to reflect new short and long option aliasesJonas Fonseca2007-10-29
|/ | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* git-add: Make the filename globbing note a bit clearerPetr Baudis2007-08-28
| | | | | | | | I think the trick with Git-side filename globbing is important and perhaps not that well known. Clarify a bit in git-add documentation what it means. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make usage documentation for git-add consistent.Brian Hetro2007-08-25
| | | | | | | | | | The usage string for the executable was missing --refresh. In addition, the documentation referred to "file", but the usage string referred to "filepattern". Updated the documentation to "filepattern", as git-add does handle patterns. Signed-off-by: Brian Hetro <whee@smaertness.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Clarify actual behavior of 'git add' and ignored filesBrian Downing2007-08-16
| | | | | Signed-off-by: Brian Downing <bdowning@lavos.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-add: Add support for --refresh option.Alexandre Julliard2007-08-13
| | | | | | | | This allows to refresh only a subset of the project files, based on the specified pathspecs. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'J. Bruce Fields2007-08-05
|\
| * documentation: use the word "index" in the git-add manual pageJ. Bruce Fields2007-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | It was a neat trick to show that you could introduce the git-add manual page without using the word "index", and it was certainly an improvement over the previous man page (which started out "A simple wrapper for git-update-index to add files to the index..."). But it's possible to use the standard terminology without sacrificing user-friendliness. So, rewrite to use the word "index" when appropriate. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* | War on whitespaceJunio C Hamano2007-06-07
|/ | | | | | | | | This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2007-05-17
|\ | | | | | | | | | | * maint: Document core.excludesfile for git-add git-send-email: allow leading white space on mutt aliases
| * Document core.excludesfile for git-addMichael Hendricks2007-05-17
| | | | | | | | | | | | | | | | During the discussion of core.excludesfile in the user-manual, I realized that the configuration wasn't mentioned in the man pages. Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Documentation/git-add: clarify -u with path limitingJeff King2007-05-13
| | | | | | | | | | Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Document git add -u introduced earlier.Matthieu Moy2007-05-07
|/ | | | | | | | This command was implemented, but not documented in dfdac5d9b877641d3aad8ec49f64c2730a3487e3. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: Correct minor typo in git-add documentation.Christian Schlotter2007-03-01
| | | | | Signed-off-by: Christian Schlotter <schlotter@users.sourceforge.net> Signed-off-by: Junio C Hamano <junkio@cox.net>