aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-push.txt
AgeCommit message (Collapse)AuthorFilesLines
2023-10-30Merge branch 'ms/doc-push-fix'Junio C Hamano1-1/+1
Docfix. * ms/doc-push-fix: git-push doc: more visibility for -q option
2023-10-20git-push doc: more visibility for -q optionMichal Suchanek1-1/+1
The "-v" option is shown in the SYNOPSIS section near the top, but "-q" is not shown anywhere there. List "-q" alongside "-v". Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-09documentation: add missing articleElijah Newren1-1/+1
Diff best viewed with --color-diff. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-24Merge branch 'ws/git-push-doc-grammofix'Junio C Hamano1-1/+1
Doc update. * ws/git-push-doc-grammofix: git-push.txt: fix grammar
2023-08-09git-push.txt: fix grammarWesley Schwengle1-1/+1
While working on a blog post and using grammarly it suggested this change. Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-06push: introduce '--branches' optionTeng Long1-1/+2
The '--all' option of git-push built-in cmd support to push all branches (refs under refs/heads) to remote. Under the usage, a user can easlily work in some scenarios, for example, branches synchronization and batch upload. The '--all' was introduced for a long time, meanwhile, git supports to customize the storage location under "refs/". when a new git user see the usage like, 'git push origin --all', we might feel like we're pushing _all_ the refs instead of just branches without looking at the documents until we found the related description of it or '--mirror'. To ensure compatibility, we cannot rename '--all' to another name directly, one way is, we can try to add a new option '--heads' which be identical with the functionality of '--all' to let the user understand the meaning of representation more clearly. Actually, We've more or less named options this way already, for example, in 'git-show-ref' and 'git ls-remote'. At the same time, we fix a related issue about the wrong help information of '--all' option in code and add some test cases in t5523, t5543 and t5583. Signed-off-by: Teng Long <dyroneteng@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-14Doc: document push.recurseSubmodules=onlyJonathan Tan1-1/+5
Git learned pushing submodules without pushing the superproject by the user specifying --recurse-submodules=only through 6c656c3fe4 ("submodules: add RECURSE_SUBMODULES_ONLY value", 2016-12-20) and 225e8bf778 ("push: add option to push only submodules", 2016-12-20). For users who use this feature regularly, it is desirable to have an equivalent configuration. It turns out that such a configuration (push.recurseSubmodules=only) is already supported, even though it is neither documented nor mentioned in the commit messages, due to the way the --recurse-submodules=only feature was implemented (a function used to parse --recurse-submodules was updated to support "only", but that same function is used to parse push.recurseSubmodules too). What is left is to document it and test it, which is what this commit does. There is a possible point of confusion when recursing into a submodule that itself has the push.recurseSubmodules=only configuration, because if a repository has only its submodules pushed and not itself, its superproject can never be pushed. Therefore, treat such configurations as being "on-demand", and print a warning message. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-09-07docs: add CONFIGURATION sections that map to a built-inÆvar Arnfjörð Bjarmason1-0/+7
Add a CONFIGURATION section to the documentation of various built-ins, for those cases where the relevant config/NAME.txt describes configuration that is only used by the relevant built-in documented in git-NAME.txt. Subsequent commits will handle more complex cases. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-07-16Merge branch 'ds/gender-neutral-doc'Junio C Hamano1-2/+2
Update the documentation not to assume users are of certain gender and adds to guidelines to do so. * ds/gender-neutral-doc: *: fix typos comments: avoid using the gender of our users doc: avoid using the gender of other people
2021-06-16doc: avoid using the gender of other peopleFelipe Contreras1-2/+2
Using gendered pronouns for an anonymous person applies a gender where none is known and further excludes readers who do not use gendered pronouns. Avoid such examples in the documentation by using "they" or passive voice to avoid the need for a pronoun. Inspired-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-13Documentation/git-push.txt: correct configuration typoTaylor Blau1-1/+1
In the EXAMPLES section, git-push(1) says that 'git push origin' pushes the current branch to the value of the 'remote.origin.merge' configuration. This wording (which dates back to b2ed944af7 (push: switch default from "matching" to "simple", 2013-01-04)) is incorrect. There is no such configuration as 'remote.<name>.merge'. This likely was originally intended to read "branch.<name>.merge" instead. Indeed, when 'push.default' is 'simple' (which is the default value, and is applicable in this scenario per "without additional configuration"), setup_push_upstream() dies if the branch's local name does not match 'branch.<name>.merge'. Correct this long-standing typo to resolve some recent confusion on the intended behavior of this example. Reported-by: Adam Sharafeddine <adam.shrfdn@gmail.com> Reported-by: Fabien Terrani <terranifabien@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-03t, doc: update tests, reference for "--force-if-includes"Srinidhi Kaushik1-1/+25
Update test cases for the new option, and document its usage and update related references. Update test cases for the new option, and document its usage and update related references. - t/t5533-push-cas.sh: Update test cases for "compare-and-swap" when used along with "--force-if-includes" helps mitigate overwrites when remote refs are updated in the background; allows forced updates when changes from remote are integrated locally. - Documentation: Add reference for the new option, configuration setting ("push.useForceIfIncludes") and advise messages. Signed-off-by: Srinidhi Kaushik <shrinidhi.kaushik@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-11doc: fix repeated wordsMark Rushakoff1-1/+1
Inspired by 21416f0a07 ("restore: fix typo in docs", 2019-08-03), I ran "git grep -E '(\b[a-zA-Z]+) \1\b' -- Documentation/" to find other cases where words were duplicated, e.g. "the the", and in most cases removed one of the repeated words. There were many false positives by this grep command, including deliberate repeated words like "really really" or valid uses of "that that" which I left alone, of course. I also did not correct any of the legitimate, accidentally repeated words in old RelNotes. Signed-off-by: Mark Rushakoff <mark.rushakoff@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-14push doc: document the DWYM behavior pushing to unqualified <dst>Ævar Arnfjörð Bjarmason1-0/+23
Document the DWYM behavior that kicks in when pushing to an unqualified <dst> reference. This behavior was added in f88395ac23 ("Renaming push.", 2005-08-03) and f8aae12034 ("push: allow unqualified dest refspecs to DWIM", 2008-04-23), and somewhat documented in bb9fca80ce ("git-push: Update description of refspecs and add examples", 2007-06-09), but has never been fully documented. The closest we got to having documented it was the description in the commit message for f8aae12034, which I've borrowed from in writing this documentation. Let's also refer to this new documentation from the existing documentation we had (added in bb9fca80ce). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-09-19push doc: add spacing between two wordsÆvar Arnfjörð Bjarmason1-1/+1
Fix a formatting error introduced in my recently landed fe802bd21e ("push doc: correct lies about how push refspecs work", 2018-08-31). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31push doc: correct lies about how push refspecs workÆvar Arnfjörð Bjarmason1-8/+44
There's complex rules governing whether a push is allowed to take place depending on whether we're pushing to refs/heads/*, refs/tags/* or refs/not-that/*. See is_branch() in refs.c, and the various assertions in refs/files-backend.c. (e.g. "trying to write non-commit object %s to branch '%s'"). This documentation has never been quite correct, but went downhill after dbfeddb12e ("push: require force for refs under refs/tags/", 2012-11-29) when we started claiming that <dst> couldn't be a tag object, which is incorrect. After some of the logic in that patch was changed in 256b9d70a4 ("push: fix "refs/tags/ hierarchy cannot be updated without --force"", 2013-01-16) the docs weren't updated, and we've had some version of documentation that confused whether <src> was a tag or not with whether <dst> would accept either an annotated tag object or the commit it points to. This makes the intro somewhat more verbose & complex, perhaps we should have a shorter description here and split the full complexity into a dedicated section. Very few users will find themselves needing to e.g. push blobs or trees to refs/custom-namespace/* (or blobs or trees at all), and that could be covered separately as an advanced topic. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31push doc: move mention of "tag <tag>" later in the proseÆvar Arnfjörð Bjarmason1-2/+2
This change will be followed-up with a subsequent change where I'll change both sides of this mention of "tag <tag>" to be something that's best read without interruption. To make that change smaller, let's move this mention of "tag <tag>" to the end of the "<refspec>..." section, it's now somewhere in the middle. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-31push doc: remove confusing mention of remote mergerÆvar Arnfjörð Bjarmason1-2/+1
Saying that "git push <remote> <src>:<dst>" won't push a merger of <src> and <dst> to <dst> is clear from the rest of the context here, so mentioning it is redundant, furthermore the mention of "EXAMPLES below" isn't specific or useful. This phrase was originally added in 149f6ddfb3 ("Docs: Expand explanation of the use of + in git push refspecs.", 2009-02-19), as can be seen in that change the point of the example being cited was to show that force pushing can leave unreferenced commits on the remote. It's enough that we explain that in its own section, it doesn't need to be mentioned here. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-23Merge branch 'ah/misc-doc-updates'Junio C Hamano1-1/+2
Misc doc fixes. * ah/misc-doc-updates: doc: normalize [--options] to [options] in git-diff doc: add note about shell quoting to revision.txt git-svn: remove ''--add-author-from' for 'commit-diff' doc: add '-d' and '-o' for 'git push' doc: clarify ignore rules for git ls-files doc: align 'diff --no-index' in text and synopsis doc: improve formatting in githooks.txt
2018-05-23Merge branch 'nd/doc-header'Junio C Hamano1-2/+2
Doc formatting fix. * nd/doc-header: doc: keep first level section header in upper case
2018-05-06doc: add '-d' and '-o' for 'git push'Andreas Heiduk1-1/+2
Add the missing `-o` shortcut for `--push-option` to the synopsis. Add the missing `-d` shortcut for `--delete` in the main section. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Reviewed-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-02doc: keep first level section header in upper caseNguyễn Thái Ngọc Duy1-2/+2
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: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-18doc: convert \--option to --optionMartin Ågren1-1/+1
Rather than using a backslash in \--foo, with or without ''-quoting, write `--foo` for better rendering. As explained in commit 1c262bb7b (doc: convert \--option to --option, 2015-05-13), the backslash is not needed for the versions of AsciiDoc that we support, but is rendered literally by Asciidoctor. Signed-off-by: Martin Ågren <martin.agren@gmail.com>
2017-10-24builtin/push.c: add push.pushOption configMarius Paliga1-2/+8
Push options need to be given explicitly, via the command line as "git push --push-option <option>". Add the config option push.pushOption, which is a multi-valued option, containing push options that are sent by default. When push options are set in the lower-priority configulation file (e.g. /etc/gitconfig, or $HOME/.gitconfig), they can be unset later in the more specific repository config by the empty string. Add tests and update documentation as well. Signed-off-by: Marius Paliga <marius.paliga@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-22Merge branch 'ma/parse-maybe-bool'Junio C Hamano1-2/+2
Code clean-up. * ma/parse-maybe-bool: parse_decoration_style: drop unused argument `var` treewide: deprecate git_config_maybe_bool, use git_parse_maybe_bool config: make git_{config,parse}_maybe_bool equivalent config: introduce git_parse_maybe_bool_text t5334: document that git push --signed=1 does not work Doc/git-{push,send-pack}: correct --sign= to --signed=
2017-08-07Doc/git-{push,send-pack}: correct --sign= to --signed=Martin Ågren1-2/+2
Since we're about to touch the behavior of --signed=, do this as a preparatory step. The documentation mentions --sign=, and it works. But that's just because it's an unambiguous abbreviation of --signed, which is how it is actually implemented. This was added in commit 30261094 ("push: support signing pushes iff the server supports it", 2015-08-19). Back when that series was developed [1] [2], there were suggestions about both --sign= and --signed=. The final implementation settled on --signed=, but some of the documentation and commit messages ended up using --sign=. The option is referred to as --signed= in Documentation/config.txt (under push.gpgSign). One could argue that we have promised --sign for two years now, so we should implement it as an alias for --signed. (Then we might also deprecate the latter, something which was considered already then.) That would be a slightly more intrusive change. This minor issue would only be a problem once we want to implement some other option --signfoo, but the earlier we do this step, the better. [1] v1-thread: https://public-inbox.org/git/1439492451-11233-1-git-send-email-dborowitz@google.com/T/#u [2] v2-thread: https://public-inbox.org/git/1439998007-28719-1-git-send-email-dborowitz@google.com/T/#m6533a6c4707a30b0d81e86169ff8559460cbf6eb Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-04-19push: document & test --force-with-lease with multiple remotesÆvar Arnfjörð Bjarmason1-0/+41
Document & test for cases where there are two remotes pointing to the same URL, and a background fetch & subsequent `git push --force-with-lease` shouldn't clobber un-updated references we haven't fetched. Some editors like Microsoft's VSC have a feature to auto-fetch in the background, this bypasses the protections offered by --force-with-lease & --force-with-lease=<refname>, as noted in the documentation being added here. See the 'Tools that do an automatic fetch defeat "git push --force-with-lease"' (<1491617750.2149.10.camel@mattmccutchen.net>) git mailing list thread for more details. Jakub Narębski suggested this method of adding another remote to bypass this edge case, document that & add a test for it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-10Merge branch 'bw/push-submodule-only'Junio C Hamano1-6/+7
Add missing documentation update to a recent topic. * bw/push-submodule-only: completion: add completion for --recurse-submodules=only doc: add doc for git-push --recurse-submodules=only
2017-02-01doc: add doc for git-push --recurse-submodules=onlyCornelius Weig1-6/+7
Add documentation for the `--recurse-submodules=only` option of git-push. The feature was added in commit 225e8bf (add option to push only submodules). Signed-off-by: Cornelius Weig <cornelius.weig@tngtech.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-10Merge branch 'mm/push-social-engineering-attack-doc'Junio C Hamano1-0/+2
Doc update on fetching and pushing. * mm/push-social-engineering-attack-doc: doc: mention transfer data leaks in more places
2016-11-14doc: mention transfer data leaks in more placesMatt McCutchen1-0/+2
The "SECURITY" section of the gitnamespaces(7) man page described two ways for a client to steal data from a server that wasn't intended to be shared. Similar attacks can be performed by a server on a client, so adapt the section to cover both directions and add it to the git-fetch(1), git-pull(1), and git-push(1) man pages. Also add references to this section from the documentation of server configuration options that attempt to control data leakage but may not be fully effective. Signed-off-by: Matt McCutchen <matt@mattmccutchen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-10Merge branch 'jk/push-force-with-lease-creation'Junio C Hamano1-2/+3
"git push --force-with-lease" already had enough logic to allow ensuring that such a push results in creation of a ref (i.e. the receiving end did not have another push from sideways that would be discarded by our force-pushing), but didn't expose this possibility to the users. It does so now. * jk/push-force-with-lease-creation: t5533: make it pass on case-sensitive filesystems push: allow pushing new branches with --force-with-lease push: add shorthand for --force-with-lease branch creation Documentation/git-push: fix placeholder formatting
2016-08-03Merge branch 'sb/push-options'Junio C Hamano1-1/+7
"git push" learned to accept and pass extra options to the receiving end so that hooks can read and react to them. * sb/push-options: add a test for push options push: accept push options receive-pack: implement advertising and receiving push options push options: {pre,post}-receive hook learns about push options
2016-07-26push: add shorthand for --force-with-lease branch creationJohn Keeping1-1/+2
Allow the empty string to stand in for the null SHA-1 when pushing a new branch, like we do when deleting branches. This means that the following command ensures that `new-branch` is created on the remote (that is, is must not already exist): git push --force-with-lease=new-branch: origin new-branch Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-25Documentation/git-push: fix placeholder formattingJohn Keeping1-1/+1
Format the placeholder as monospace to match other occurrences in this file and obey CodingGuidelines. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-14push: accept push optionsStefan Beller1-1/+7
This implements everything that is required on the client side to make use of push options from the porcelain push command. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-28doc: typeset long command-line options as literalMatthieu Moy1-1/+1
Similarly to the previous commit, use backquotes instead of forward-quotes, for long options. This was obtained with: perl -pi -e "s/'(--[a-z][a-z=<>-]*)'/\`\$1\`/g" *.txt and manual tweak to remove false positive in ascii-art (o'--o'--o' to describe rewritten history). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-08doc: change configuration variables formatTom Russello1-3/+3
This change configuration variables that where in italic style to monospace font according to the guideline. It was obtained with grep '[[:alpha:]]*\.[[:alpha:]]*::$' config.txt | \ sed -e 's/::$//' -e 's/\./\\\\./' | \ xargs -iP perl -pi -e "s/\'P\'/\`P\`/g" ./*.txt Signed-off-by: Tom Russello <tom.russello@grenoble-inp.org> Signed-off-by: Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org> Signed-off-by: Samuel Groot <samuel.groot@grenoble-inp.org> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-10Merge branch 'mm/push-simple-doc' into maintJunio C Hamano1-0/+7
The documentation did not clearly state that the 'simple' mode is now the default for "git push" when push.default configuration is not set. * mm/push-simple-doc: Documentation/git-push: document that 'simple' is the default
2016-02-26Merge branch 'mm/push-simple-doc'Junio C Hamano1-0/+7
The documentation did not clearly state that the 'simple' mode is now the default for "git push" when push.default configuration is not set. * mm/push-simple-doc: Documentation/git-push: document that 'simple' is the default
2016-02-24Merge branch 'ew/force-ipv4'Junio C Hamano1-0/+7
"git fetch" and friends that make network connections can now be told to only use ipv4 (or ipv6). * ew/force-ipv4: connect & http: support -4 and -6 switches for remote operations
2016-02-23Documentation/git-push: document that 'simple' is the defaultMatthieu Moy1-0/+7
The default behavior is well documented already in git-config(1), but git-push(1) itself did not mention it at all. For users willing to learn how "git push" works but not how to configure it, this makes the documentation cumbersome to read. Make the git-push(1) page self-contained by adding a short summary of what 'push.default=simple' does, early in the page. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-12connect & http: support -4 and -6 switches for remote operationsEric Wong1-0/+7
Sometimes it is necessary to force IPv4-only or IPv6-only operation on networks where name lookups may return a non-routable address and stall remote operations. The ssh(1) command has an equivalent switches which we may pass when we run them. There may be old ssh(1) implementations out there which do not support these switches; they should report the appropriate error in that case. rsync support is untouched for now since it is deprecated and scheduled to be removed. Signed-off-by: Eric Wong <normalperson@yhbt.net> Reviewed-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-12Merge branch 'ps/push-delete-option'Junio C Hamano1-1/+1
"branch --delete" has "branch -d" but "push --delete" does not. * ps/push-delete-option: push: add '-d' as shorthand for '--delete' push: add '--delete' flag to synopsis
2015-12-16push: add '-d' as shorthand for '--delete'Patrick Steinhardt1-1/+1
"git push" takes "--delete" but does not take a short form "-d", unlike "git branch" which does take both. Bring consistency between them. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-14push: add '--delete' flag to synopsisPatrick Steinhardt1-1/+1
The delete flag is not mentioned in the synopsis of `git-push`. Add the flag to make it more discoverable. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-11-20push: add recurseSubmodules config optionMike Crowe1-10/+14
The --recurse-submodules command line parameter has existed for some time but it has no config file equivalent. Following the style of the corresponding parameter for git fetch, let's invent push.recurseSubmodules to provide a default for this parameter. This also requires the addition of --recurse-submodules=no to allow the configuration to be overridden on the command line when required. The most straightforward way to implement this appears to be to make push use code in submodule-config in a similar way to fetch. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Jeff King <peff@peff.net>
2015-10-29Merge branch 'jc/em-dash-in-doc'Junio C Hamano1-1/+1
AsciiDoc markup fixes. * jc/em-dash-in-doc: Documentation: AsciiDoc spells em-dash as double-dashes, not triple
2015-10-22Documentation: AsciiDoc spells em-dash as double-dashes, not tripleJunio C Hamano1-1/+1
Again, we do not usually process release notes with AsciiDoc, but it is better to be consistent. This incidentally reveals breakages left by an ancient 5e00439f (Documentation: build html for all files in technical and howto, 2012-10-23). The index-format documentation was originally written to be read as straight text without formatting and when the commit forced everything in Documentation/ to go through AsciiDoc, it did not do any adjustment--hence the double-dashes will be seen in the resulting text that is rendered as preformatted fixed-width without converted into em-dashes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-08-19push: support signing pushes iff the server supports itDave Borowitz1-7/+10
Add a new flag --sign=true (or --sign=false), which means the same thing as the original --signed (or --no-signed). Give it a third value --sign=if-asked to tell push and send-pack to send a push certificate if and only if the server advertised a push cert nonce. If not, warn the user that their push may not be as secure as they thought. Signed-off-by: Dave Borowitz <dborowitz@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-08-19Documentation/git-push.txt: document when --signed may failDave Borowitz1-1/+3
Like --atomic, --signed will fail if the server does not advertise the necessary capability. In addition, it requires gpg on the client side. Signed-off-by: Dave Borowitz <dborowitz@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-05Merge branch 'jk/asciidoc-markup-fix' into maintJunio C Hamano1-2/+2
Various documentation mark-up fixes to make the output more consistent in general and also make AsciiDoctor (an alternative formatter) happier. * jk/asciidoc-markup-fix: doc: convert AsciiDoc {?foo} to ifdef::foo[] doc: put example URLs and emails inside literal backticks doc: drop backslash quoting of some curly braces doc: convert \--option to --option doc/add: reformat `--edit` option doc: fix length of underlined section-title doc: fix hanging "+"-continuation doc: fix unquoted use of "{type}" doc: fix misrendering due to `single quote'
2015-05-12doc: convert \--option to --optionJeff King1-2/+2
Older versions of AsciiDoc would convert the "--" in "--option" into an emdash. According to 565e135 (Documentation: quote double-dash for AsciiDoc, 2011-06-29), this is fixed in AsciiDoc 8.3.0. According to bf17126, we don't support anything older than 8.4.1 anyway, so we no longer need to worry about quoting. Even though this does not change the output at all, there are a few good reasons to drop the quoting: 1. It makes the source prettier to read. 2. We don't quote consistently, which may be confusing when reading the source. 3. Asciidoctor does not like the quoting, and renders a literal backslash. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-31Merge branch 'ph/push-doc-cas' into maintJunio C Hamano1-8/+6
* ph/push-doc-cas: git-push.txt: clean up force-with-lease wording
2015-03-28Merge branch 'ph/push-doc-cas'Junio C Hamano1-8/+6
* ph/push-doc-cas: git-push.txt: clean up force-with-lease wording
2015-03-26git-push.txt: clean up force-with-lease wordingPhil Hord1-8/+6
The help text for the --force-with-lease option to git-push does not parse cleanly. Clean up the wording and syntax to be more sensible. Also remove redundant information in the "--force-with-lease alone" description. Signed-off-by: Phil Hord <hordp@cisco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-23Merge branch 'jk/push-config'Junio C Hamano1-1/+4
Restructure "git push" codepath to make it easier to add new configuration bits and then add push.followTags configuration that turns --follow-tags option on by default. * jk/push-config: push: allow --follow-tags to be set by config push.followTags cmd_push: pass "flags" pointer to config callback cmd_push: set "atomic" bit directly git_push_config: drop cargo-culted wt_status pointer
2015-03-14push: allow --follow-tags to be set by config push.followTagsDave Olszewski1-1/+4
Signed-off-by: Dave Olszewski <cxreg@pobox.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-24Merge branch 'mg/push-repo-option-doc' into maintJunio C Hamano1-16/+2
The "git push" documentation made the "--repo=<there>" option easily misunderstood. * mg/push-repo-option-doc: git-push.txt: document the behavior of --repo
2015-02-17Merge branch 'mg/push-repo-option-doc'Junio C Hamano1-16/+2
The "git push" documentation made the "--repo=<there>" option easily misunderstood. * mg/push-repo-option-doc: git-push.txt: document the behavior of --repo
2015-02-11Merge branch 'sb/atomic-push'Junio C Hamano1-1/+6
"git push" has been taught a "--atomic" option that makes push to update more than one ref an "all-or-none" affair. * sb/atomic-push: Document receive.advertiseatomic t5543-atomic-push.sh: add basic tests for atomic pushes push.c: add an --atomic argument send-pack.c: add --atomic command line argument send-pack: rename ref_update_to_be_sent to check_to_send_update receive-pack.c: negotiate atomic push support receive-pack.c: add execute_commands_atomic function receive-pack.c: move transaction handling in a central place receive-pack.c: move iterating over all commands outside execute_commands receive-pack.c: die instead of error in case of possible future bug receive-pack.c: shorten the execute_commands loop over all commands
2015-01-28git-push.txt: document the behavior of --repoMichael J Gruber1-16/+2
As per the code, the --repo <repo> option is equivalent to the <repo> argument to 'git push', but somehow it was documented as something that is more than that. [It exists for historical reasons, back from the time when options had to come before arguments.] Say so. [But not that.] Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-07push.c: add an --atomic argumentRonnie Sahlberg1-1/+6
Add a command line argument to the git push command to request atomic pushes. Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-22Merge branch 'po/everyday-doc' into maintJunio C Hamano1-1/+1
"Everyday" document had a broken link. * po/everyday-doc: Documentation: change "gitlink" typo in git-push
2014-12-12Merge branch 'po/everyday-doc'Junio C Hamano1-1/+1
* po/everyday-doc: Documentation: change "gitlink" typo in git-push
2014-11-17Documentation: change "gitlink" typo in git-pushbrian m. carlson1-1/+1
The git-push manual page used "gitlink" in one place instead of "linkgit". Fix this so the link renders correctly. Noticed-by: Dan Allen <dan.j.allen@gmail.com> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-16Merge branch 'po/everyday-doc'Junio C Hamano1-1/+1
"git help everyday" to show the Everyday Git document. * po/everyday-doc: doc: add 'everyday' to 'git help' doc: Makefile regularise OBSOLETE_HTML list building doc: modernise everyday.txt wording and format in man page style
2014-10-10doc: add 'everyday' to 'git help'Philip Oakley1-1/+1
The "Everyday GIT With 20 Commands Or So" is not accessible via the Git help system. Move everyday.txt to giteveryday.txt so that "git help everyday" works, and create a new placeholder file everyday.html to refer people who follow existing URLs to the updated location. giteveryday.txt now formats well with AsciiDoc as a man page and refreshed content to a more command modern style. Add 'everyday' to the help --guides list and update git(1) and 5 other links to giteveryday. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-08Merge branch 'jc/push-cert'Junio C Hamano1-1/+8
Allow "git push" request to be signed, so that it can be verified and audited, using the GPG signature of the person who pushed, that the tips of branches at a public repository really point the commits the pusher wanted to, without having to "trust" the server. * jc/push-cert: (24 commits) receive-pack::hmac_sha1(): copy the entire SHA-1 hash out signed push: allow stale nonce in stateless mode signed push: teach smart-HTTP to pass "git push --signed" around signed push: fortify against replay attacks signed push: add "pushee" header to push certificate signed push: remove duplicated protocol info send-pack: send feature request on push-cert packet receive-pack: GPG-validate push certificates push: the beginning of "git push --signed" pack-protocol doc: typofix for PKT-LINE gpg-interface: move parse_signature() to where it should be gpg-interface: move parse_gpg_output() to where it should be send-pack: clarify that cmds_sent is a boolean send-pack: refactor inspecting and resetting status and sending commands send-pack: rename "new_refs" to "need_pack_data" receive-pack: factor out capability string generation send-pack: factor out capability string generation send-pack: always send capabilities send-pack: refactor decision to send update per ref send-pack: move REF_STATUS_REJECT_NODELETE logic a bit higher ...
2014-09-15push: the beginning of "git push --signed"Junio C Hamano1-1/+8
While signed tags and commits assert that the objects thusly signed came from you, who signed these objects, there is not a good way to assert that you wanted to have a particular object at the tip of a particular branch. My signing v2.0.1 tag only means I want to call the version v2.0.1, and it does not mean I want to push it out to my 'master' branch---it is likely that I only want it in 'maint', so the signature on the object alone is insufficient. The only assurance to you that 'maint' points at what I wanted to place there comes from your trust on the hosting site and my authentication with it, which cannot easily audited later. Introduce a mechanism that allows you to sign a "push certificate" (for the lack of better name) every time you push, asserting that what object you are pushing to update which ref that used to point at what other object. Think of it as a cryptographic protection for ref updates, similar to signed tags/commits but working on an orthogonal axis. The basic flow based on this mechanism goes like this: 1. You push out your work with "git push --signed". 2. The sending side learns where the remote refs are as usual, together with what protocol extension the receiving end supports. If the receiving end does not advertise the protocol extension "push-cert", an attempt to "git push --signed" fails. Otherwise, a text file, that looks like the following, is prepared in core: certificate version 0.1 pusher Junio C Hamano <gitster@pobox.com> 1315427886 -0700 7339ca65... 21580ecb... refs/heads/master 3793ac56... 12850bec... refs/heads/next The file begins with a few header lines, which may grow as we gain more experience. The 'pusher' header records the name of the signer (the value of user.signingkey configuration variable, falling back to GIT_COMMITTER_{NAME|EMAIL}) and the time of the certificate generation. After the header, a blank line follows, followed by a copy of the protocol message lines. Each line shows the old and the new object name at the tip of the ref this push tries to update, in the way identical to how the underlying "git push" protocol exchange tells the ref updates to the receiving end (by recording the "old" object name, the push certificate also protects against replaying). It is expected that new command packet types other than the old-new-refname kind will be included in push certificate in the same way as would appear in the plain vanilla command packets in unsigned pushes. The user then is asked to sign this push certificate using GPG, formatted in a way similar to how signed tag objects are signed, and the result is sent to the other side (i.e. receive-pack). In the protocol exchange, this step comes immediately before the sender tells what the result of the push should be, which in turn comes before it sends the pack data. 3. When the receiving end sees a push certificate, the certificate is written out as a blob. The pre-receive hook can learn about the certificate by checking GIT_PUSH_CERT environment variable, which, if present, tells the object name of this blob, and make the decision to allow or reject this push. Additionally, the post-receive hook can also look at the certificate, which may be a good place to log all the received certificates for later audits. Because a push certificate carry the same information as the usual command packets in the protocol exchange, we can omit the latter when a push certificate is in use and reduce the protocol overhead. This however is not included in this patch to make it easier to review (in other words, the series at this step should never be released without the remainder of the series, as it implements an interim protocol that will be incompatible with the final one). As such, the documentation update for the protocol is left out of this step. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-04Merge branch 'tf/maint-doc-push'Junio C Hamano1-1/+1
* tf/maint-doc-push: git-push: fix link in man page
2014-07-31git-push: fix link in man pageTony Finch1-1/+1
Signed-off-by: Tony Finch <dot@dotat.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-08Merge branch 'jl/nor-or-nand-and'Junio C Hamano1-1/+1
Eradicate mistaken use of "nor" (that is, essentially "nor" used not in "neither A nor B" ;-)) from in-code comments, command output strings, and documentations. * jl/nor-or-nand-and: code and test: fix misuses of "nor" comments: fix misuses of "nor" contrib: fix misuses of "nor" Documentation: fix misuses of "nor"
2014-03-31Documentation: fix misuses of "nor"Justin Lebar1-1/+1
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-07Merge branch 'jc/push-2.0-default-to-simple'Junio C Hamano1-4/+6
Finally update the "git push" default behaviour to "simple".
2013-12-04push: use remote.$name.push as a refmapJunio C Hamano1-2/+7
Since f2690487 (fetch: opportunistically update tracking refs, 2013-05-11), we stopped taking a non-storing refspec given on the command line of "git fetch" literally, and instead started mapping it via remote.$name.fetch refspecs. This allows $ git fetch origin master from the 'origin' repository, which is configured with [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* to update refs/remotes/origin/master with the result, as if the command line were $ git fetch origin +master:refs/remotes/origin/master to reduce surprises and improve usability. Before that change, a refspec on the command line without a colon was only to fetch the history and leave the result in FETCH_HEAD, without updating the remote-tracking branches. When you are simulating a fetch from you by your mothership with a push by you into your mothership, instead of having: [remote "satellite"] fetch = +refs/heads/*:refs/remotes/satellite/* on the mothership repository and running: mothership$ git fetch satellite you would have: [remote "mothership"] push = +refs/heads/*:refs/remotes/satellite/* on your satellite machine, and run: satellite$ git push mothership Because we so far did not make the corresponding change to the push side, this command: satellite$ git push mothership master does _not_ allow you on the satellite to only push 'master' out but still to the usual destination (i.e. refs/remotes/satellite/master). Implement the logic to map an unqualified refspec given on the command line via the remote.$name.push refspec. This will bring a bit more symmetry between "fetch" and "push". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-17Merge branch 'rh/ishes-doc'Junio C Hamano1-1/+1
We liberally use "committish" and "commit-ish" (and "treeish" and "tree-ish"); as these are non-words, let's unify these terms to their dashed form. More importantly, clarify the documentation on object peeling using these terms. * rh/ishes-doc: glossary: fix and clarify the definition of 'ref' revisions.txt: fix and clarify <rev>^{<type>} glossary: more precise definition of tree-ish (a.k.a. treeish) use 'commit-ish' instead of 'committish' use 'tree-ish' instead of 'treeish' glossary: define commit-ish (a.k.a. committish) glossary: mention 'treeish' as an alternative to 'tree-ish'
2013-09-04use 'commit-ish' instead of 'committish'Richard Hansen1-1/+1
Replace 'committish' in documentation and comments with 'commit-ish' to match gitglossary(7) and to be consistent with 'tree-ish'. The only remaining instances of 'committish' are: * variable, function, and macro names * "(also committish)" in the definition of commit-ish in gitglossary[7] Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22remote.c: add command line option parser for "--force-with-lease"Junio C Hamano1-11/+66
Update "git push" and "git send-pack" to parse this commnd line option. The intended sematics is: * "--force-with-lease" alone, without specifying the details, will protect _all_ remote refs that are going to be updated by requiring their current value to be the same as some reasonable default, unless otherwise specified; * "--force-with-lease=refname", without specifying the expected value, will protect that refname, if it is going to be updated, by requiring its current value to be the same as some reasonable default. * "--force-with-lease=refname:value" will protect that refname, if it is going to be updated, by requiring its current value to be the same as the specified value; and * "--no-force-with-lease" will cancel all the previous --force-with-lease on the command line. For now, "some reasonable default" is tentatively defined as "the value of the remote-tracking branch we have for the ref of the remote being updated", and it is an error if we do not have such a remote-tracking branch. But this is known to be fragile, its use is not yet recommended, and hopefully we will find more reasonable default as we gain experience with this feature. The manual marks the feature as experimental unless the expected value is specified explicitly for this reason. Because the command line options are parsed _before_ we know which remote we are pushing to, there needs further processing to the parsed data after we instantiate the transport object to: * expand "refname" given by the user to a full refname to be matched with the list of "struct ref" used in match_push_refs() and set_ref_status_for_push(); and * learning the actual local ref that is the remote-tracking branch for the specified remote ref. Further, some processing need to be deferred until we find the set of remote refs and match_push_refs() returns in order to find the ones that need to be checked after explicit ones have been processed for "--force-with-lease" (no specific details). These post-processing will be the topic of the next patch. This option was originally called "cas" (for "compare and swap"), the name which nobody liked because it was too technical. The second attempt called it "lockref" (because it is conceptually like pushing after taking a lock) but the word "lock" was hated because it implied that it may reject push by others, which is not the way this option works. This round calls it "force-with-lease". You assume you took the lease on the ref when you fetched to decide what the rebased history should be, and you can push back only if the lease has not been broken. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-26Merge branch 'mm/push-force-is-dangerous'Junio C Hamano1-0/+9
* mm/push-force-is-dangerous: Documentation/git-push.txt: explain better cases where --force is dangerous
2013-06-18push: switch default from "matching" to "simple"Junio C Hamano1-11/+14
We promised to change the behaviour of lazy "git push [there]" that does not say what to push on the command line from "matching" to "simple" in Git 2.0. This finally flips that bit. Helped-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-18Documentation/git-push.txt: explain better cases where --force is dangerousMatthieu Moy1-0/+9
The behavior of "git push --force" is rather clear when it updates only one remote ref, but running it when pushing several branches can really be dangerous. Warn the users a bit more and give them the alternative to push only one branch. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-05Merge branch 'tr/push-no-verify-doc'Junio C Hamano1-1/+6
"git push --[no-]verify" was not documented. * tr/push-no-verify-doc: Document push --no-verify
2013-05-23Document push --no-verifyThomas Rast1-1/+6
ec55559 (push: Add support for pre-push hooks, 2013-01-13) forgot to add a note to git-push(1) about the new --no-verify option. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17documentation: trivial style cleanupsFelipe Contreras1-2/+1
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-03-26Merge branch 'jc/maint-push-refspec-default-doc' into maintJunio C Hamano1-9/+14
* jc/maint-push-refspec-default-doc: Documentation/git-push: clarify the description of defaults
2013-03-25Merge branch 'jc/push-follow-tag'Junio C Hamano1-1/+7
The new "--follow-tags" option tells "git push" to push relevant annotated tags when pushing branches out. * jc/push-follow-tag: push: --follow-tags commit.c: use clear_commit_marks_many() in in_merge_bases_many() commit.c: add in_merge_bases_many() commit.c: add clear_commit_marks_many()
2013-03-21Merge branch 'jc/maint-push-refspec-default-doc'Junio C Hamano1-9/+14
Clarify in the documentation "what" gets pushed to "where" when the command line to "git push" does not say these explicitly. * jc/maint-push-refspec-default-doc: Documentation/git-push: clarify the description of defaults
2013-03-08Documentation/git-push: clarify the description of defaultsJunio C Hamano1-9/+14
We describe what gets pushed by default when the command line does not give any <refspec> under the bullet point of <refspec>. It is a bit unfriendly to expect users to read on <refspec> when they are not giving any in the first place. "What gets pushed" is determined by taking many factors (<refspec> argument being only one of them) into account, and is a property of the entire command, not an individual argument. Also we do not describe "Where the push goes" when the command line does not say. Give the description on "what gets pushed to where" upfront before explaining individual arguments and options. Also update the description of <refspec> to say what it is, what it is used for, before explaining what shape it takes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-05push: --follow-tagsJunio C Hamano1-1/+7
The new option "--follow-tags" tells "git push" to push annotated tags that are missing from the other side and that can be reached by the history that is otherwise pushed out. For example, if you are using the "simple", "current", or "upstream" push, you would ordinarily push the history leading to the commit at your current HEAD and nothing else. With this option, you would also push all annotated tags that can be reached from that commit to the other side. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01Documentation: the name of the system is 'Git', not 'git'Thomas Ackermann1-4/+4
Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-05Merge branch 'cr/push-force-tag-update'Junio C Hamano1-4/+5
Require "-f" for push to update a tag, even if it is a fast-forward. * cr/push-force-tag-update: push: allow already-exists advice to be disabled push: rename config variable for more general use push: cleanup push rules comment push: clarify rejection of update to non-commit-ish push: require force for annotated tags push: require force for refs under refs/tags/ push: flag updates that require force push: keep track of "update" state separately push: add advice for rejected tag reference push: return reject reasons as a bitset
2012-12-02push: require force for annotated tagsChris Rorvick1-5/+5
Do not allow fast-forwarding of references that point to a tag object. Updating from a tag is potentially destructive since it would likely leave the tag dangling. Disallowing updates to a tag also makes sense semantically and is consistent with the behavior of lightweight tags. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-02push: require force for refs under refs/tags/Chris Rorvick1-5/+6
References are allowed to update from one commit-ish to another if the former is an ancestor of the latter. This behavior is oriented to branches which are expected to move with commits. Tag references are expected to be static in a repository, though, thus an update to something under refs/tags/ should be rejected unless the update is forced. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27Documentation/git-push.txt: clarify the "push from satellite" workflowJunio C Hamano1-2/+14
The context of the example to push into refs/remotes/satellite/ hierarchy of the other repository needs to be spelled out explicitly for the value of this example to be fully appreciated. Make it so. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27Documentation: improve phrasing in git-push.txtMark Szepieniec1-1/+2
The current version contains the sentence: Further suppose that the other person already pushed changes leading to A back to the original repository you two obtained the original commit X. which doesn't parse for me; I've changed it to Further suppose that the other person already pushed changes leading to A back to the original repository from which you two obtained the original commit X. Signed-off-by: Mark Szepieniec <mszepien@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18Merge branch 'mm/maint-doc-remote-tracking' into maintJunio C Hamano1-1/+1
Update "remote tracking branch" in the documentation to "remote-tracking branch". * mm/maint-doc-remote-tracking: Documentation: remote tracking branch -> remote-tracking branch
2012-11-04Merge branch 'mm/maint-doc-remote-tracking'Jeff King1-1/+1
We long ago hyphenated "remote-tracking branch"; this catches some new instances added since then. * mm/maint-doc-remote-tracking: Documentation: remote tracking branch -> remote-tracking branch
2012-10-25Documentation: remote tracking branch -> remote-tracking branchMatthieu Moy1-1/+1
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-02Documentation: mention `push.default` in git-push.txtRamkumar Ramachandra1-3/+7
It already is listed in the "git config" documentation, but people interested in pushing would first look at "git push" documentation. Noticed-by: David Glasser Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Fixed-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-02Merge branch 'jk/doc-asciidoc-inline-literal'Junio C Hamano1-7/+7
Our documentation was written for an ancient version of AsciiDoc, making the source not very readable. By Jeff King * jk/doc-asciidoc-inline-literal: docs: stop using asciidoc no-inline-literal
2012-04-26docs: stop using asciidoc no-inline-literalJeff King1-7/+7
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: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24Merge branch 'hv/submodule-recurse-push'Junio C Hamano1-4/+10
"git push --recurse-submodules" learns to optionally look into the histories of submodules bound to the superproject and push them out. By Heiko Voigt * hv/submodule-recurse-push: push: teach --recurse-submodules the on-demand option Refactor submodule push check to use string list instead of integer Teach revision walking machinery to walk multiple times sequencially
2012-03-30push: teach --recurse-submodules the on-demand optionHeiko Voigt1-4/+10
When using this option git will search for all submodules that have changed in the revisions to be send. It will then try to push the currently checked out branch of each submodule. This helps when a user has finished working on a change which involves submodules and just wants to push everything in one go. Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com> Mentored-by: Jens Lehmann <Jens.Lehmann@web.de> Mentored-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-22push: add '--prune' optionFelipe Contreras1-1/+9
When pushing groups of refs to a remote, there is no simple way to remove old refs that still exist at the remote that is no longer updated from us. This will allow us to remove such refs from the remote. With this change, running this command $ git push --prune remote refs/heads/*:refs/remotes/laptop/* removes refs/remotes/laptop/foo from the remote if we do not have branch "foo" locally anymore. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-02Merge branch 'fg/submodule-ff-check-before-push'Junio C Hamano1-0/+6
* fg/submodule-ff-check-before-push: push: Don't push a repository with unpushed submodules
2011-08-20push: Don't push a repository with unpushed submodulesFredrik Gustafsson1-0/+6
When working with submodules it is easy to forget to push a submodule to the server but pushing a super-project that contains a commit for that submodule. The result is that the superproject points at a submodule commit that is not available on the server. This adds the option --recurse-submodules=check to push. When using this option git will check that all submodule commits that are about to be pushed are present on a remote of the submodule. To be able to use a combined diff, disabling a diff callback has been removed from combined-diff.c. Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com> Mentored-by: Jens Lehmann <Jens.Lehmann@web.de> Mentored-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04docs: put listed example commands in backticksJeff King1-10/+10
Many examples of git command invocation are given in asciidoc listing blocks, which makes them monospaced and avoids further interpretation of special characters. Some manpages make a list of examples, like: git foo:: Run git foo. git foo -q:: Use the "-q" option. to quickly show many variants. However, they can sometimes be hard to read, because they are shown in a proportional-width font (so, for example, seeing the difference between "-- foo" and "--foo" can be difficult). This patch puts all such examples into backticks, which gives the equivalent formatting to a listing block (i.e., monospaced and without character interpretation). As a bonus, this also fixes an example in the git-push manpage, in which "git push origin :::" was accidentally considered a newly-indented list, and not a list item with "git push origin :" in it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-11doc: drop author/documentation sections from most pagesJeff King1-10/+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-10-13Documentation: gitrevisions is in section 7Jonathan Nieder1-1/+1
Fix references to gitrevisions(1) in the manual pages and HTML documentation. In practice, this will not matter much unless someone tries to use a hard copy of the git reference manual. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-20Documentation: do not convert ... operator to ellipsesJonathan Nieder1-1/+1
The symmetric difference or merge-base operator ... as used by rev-list and diff is actually three period characters. If it gets replaced by an ellipsis glyph in the manual, that would stop readers from copying and pasting it. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-25Documentation/git-push: Explain status output in more detailThomas Rast1-10/+23
Mention the effects of the receive.deny* family of options for the "remote rejected" case. While there, also split up the explanation into an easier-to-parse list format. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-05Documentation: link to gitrevisions rather than git-rev-parseMichael J Gruber1-1/+1
Currently, whenever we need documentation for revisions and ranges, we link to the git-rev-parse man page, i.e. a plumbing man page, which has this along with the documentation of all rev-parse modes. Link to the new gitrevisions man page instead in all cases except - when the actual git-rev-parse command is referred to or - in very technical context (git-send-pack). Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-09Merge branch 'maint'Junio C Hamano1-1/+1
* maint: Let check_preimage() use memset() to initialize "struct checkout" fetch/push: fix usage strings
2010-04-09fetch/push: fix usage stringsTay Ray Chuan1-1/+1
- use "<options>" instead of just "options". - use "[<repository> [<refspec>...]]" to indicate that <repository> and <refspec> are optional, and that <refspec> cannot be specified without specifying <repository>. Note that when called without specifying <repository> (eg. "git fetch -f"), it is accurate to say that the "git fetch [<options>] [<repository> ...]" case takes precedence over "git fetch [<options>] <group>". Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-15Merge branch 'tc/transport-verbosity'Junio C Hamano1-4/+11
* 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-02-24push: learn --progressTay Ray Chuan1-1/+8
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-24Documentation/git-push: put --quiet before --verboseTay Ray Chuan1-4/+4
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-18Documentation: describe --thin more accuratelyStephen Boyd1-3/+4
The description for --thin was misleading and downright wrong. Correct it with some inspiration from the description of index-pack's --fix-thin and some background information from Nicolas Pitre <nico@fluxnic.net>. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17docs: don't talk about $GIT_DIR/refs/ everywhereJeff King1-3/+3
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-08Merge branch 'maint'Junio C Hamano1-5/+10
* maint: blame: prevent a segv when -L given start > EOF git-push: document all the status flags used in the output Fix parsing of imap.preformattedHTML and imap.sslverify git-add documentation: Fix shell quoting example
2010-02-08Merge branch 'jc/maint-push-doc-status' into maintJunio C Hamano1-5/+10
* jc/maint-push-doc-status: git-push: document all the status flags used in the output
2010-02-08git-push: document all the status flags used in the outputJunio C Hamano1-5/+10
We didn't talk about '-' (deletion), '*' (addition), nor '+' (forced). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-24Documentation: move away misplaced 'push --upstream' descriptionThomas Rast1-7/+7
e9fcd1e (Add push --set-upstream, 2010-01-16) inadvertently patched the description of --upstream in the middle of that of --repo. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-20Merge remote branch 'remotes/trast-doc/for-next'Junio C Hamano1-3/+3
* remotes/trast-doc/for-next: Documentation: spell 'git cmd' without dash throughout Documentation: format full commands in typewriter font Documentation: warn prominently against merging with dirty trees Documentation/git-merge: reword references to "remote" and "pull" Conflicts: Documentation/config.txt Documentation/git-config.txt Documentation/git-merge.txt
2010-01-16Add push --set-upstreamIlari Liusvaara1-1/+8
Frequent complaint is lack of easy way to set up upstream (tracking) references for git pull to work as part of push command. So add switch --set-upstream (-u) to do just that. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-10Documentation: spell 'git cmd' without dash throughoutThomas Rast1-3/+3
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 647ac70 (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.
2009-12-30builtin-push: add --delete as syntactic sugar for :fooJan Krüger1-0/+4
Refspecs without a source side have been reported as confusing by many. As an alternative, this adds support for commands like: git push origin --delete somebranch git push origin --delete tag sometag Specifically, --delete will prepend a colon to all colon-less refspecs given on the command line, and will refuse to accept refspecs with colons to prevent undue confusion. Signed-off-by: Jan Krüger <jk@jk.gs> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-15Merge branch 'fc/doc-fast-forward'Junio C Hamano1-7/+7
* fc/doc-fast-forward: Use 'fast-forward' all over the place Conflicts: builtin-merge.c
2009-10-24Use 'fast-forward' all over the placeFelipe Contreras1-7/+7
It's a compound word. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18document push's new quiet optionJeff King1-0/+5
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-13git-push: Accept -n as a synonym for --dry-run.Nelson Elhage1-1/+2
git-push is not currently using -n for anything else, and it seems unlikely we will want to use it to mean anything else in the future, so add it as an alias for convenience. Signed-off-by: Nelson Elhage <nelhage@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12push: point to 'git pull' and 'git push --force' in case of non-fast forwardMatthieu Moy1-0/+86
'git push' failing because of non-fast forward is a very common situation, and a beginner does not necessarily understand "fast forward" immediately. Add a new section to the git-push documentation and refer them to it. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-27add --porcelain option to git-pushLarry D'Anna1-0/+11
If --porcelain is used git-push will produce machine-readable output. The output status line for each ref will be tab-separated and sent to stdout instead of stderr. The full symbolic names of the refs will be given. For example $ git push --dry-run --porcelain master :foobar 2>/dev/null \ | perl -pe 's/\t/ TAB /g' = TAB refs/heads/master:refs/heads/master TAB [up to date] - TAB :refs/heads/foobar TAB [deleted] Signed-off-by: Larry D'Anna <larry@elder-gods.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17git-push.txt: describe how to default to pushing only current branchChris Johnsen1-2/+24
Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-25Docs: Expand explanation of the use of + in git push refspecs.Marc Branchaud1-5/+31
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-18Documentation/git-push: --all, --mirror, --tags can not be combinedGerrit Pape1-1/+1
While b259f09 made git-push output a better error message for 'git-push --all --tags', this commit fixes the synopsis in the documentation. Inconsistency spotted and fix suggested by Jari Aalto through http://bugs.debian.org/502567 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25Documentation: rework src/dst description in git pushAnders Melchiorsen1-11/+12
This tries to make the description of ref matching in git push easier to read. Beauty is in the eye of the beholder, though. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25Documentation: more git push examplesAnders Melchiorsen1-3/+13
Include examples of using HEAD. The order of examples introduces new concepts one by one. This pushes the example of deleting a ref to the end of the list. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-25Documentation: simplify refspec format descriptionJunio C Hamano1-4/+5
The refspec format description was a mix of regexp and BNF, making it very difficult to read. The format was also wrong: it did not show that each part of a refspec is optional in different situations. Rather than having a confusing grammar, just present the format in informal prose. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18Documentation: avoid using undefined parametersAnders Melchiorsen1-2/+2
The <ref> parameter has not been introduced, so rewrite to avoid it. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18Documentation: mention branches rather than headsAnders Melchiorsen1-2/+2
The "matching refs" semantics works only on matching branches these days. Instead of using "heads" which traditionally has been used more or less interchangeably with "refs", say "branch" explicitly here. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18Documentation: remove a redundant elaborationAnders Melchiorsen1-2/+1
The comment in parentheses is wrong, as one has to leave out both the colon and <dst>. This situation is covered by the section a few lines down: A parameter <ref> without a colon pushes the <ref> from the source repository to the destination repository under the same name. So, just remove the parentheses. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-18Documentation: git push repository can also be a remoteAnders Melchiorsen1-1/+3
This is copied from pull-fetch-param.txt and helps the reader to not get stuck in the URL section. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-11Documentation/git-push.txt: minor: compress one optionjidanni@jidanni.org1-3/+1
Signed-off-by: jidanni <jidanni@jidanni.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-08git-push.txt: Describe --repo option in more detailJohannes Sixt1-5/+19
The --repo option was described in a way that the reader would have to assume that it is the same as the <repository> parameter. But it actually servers a purpose, which is now written down. Furthermore, the --mirror option was missing from the synopsis. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-08-09Merge branch 'maint'Junio C Hamano1-2/+2
* maint: asciidoc markup fixes Fail properly when cloning from invalid HTTP URL Conflicts: Documentation/git-push.txt
2008-08-07asciidoc markup fixesJunio C Hamano1-1/+1
I see quite a few pages on k.org site, e.g. http://www.kernel.org/pub/software/scm/git/docs/git-rerere.html (scroll down to find "After this test merge") are misformatted to lose teletype text '+' that is followed by a comma, and turns the following paragraph all typeset in teletype. This patch seems to fix the issue at the site (meaning, with the particular vintage of asciidoc and docbook toolchain), without breaking things with the version I have at my primary development machine, but wider testing is very much appreciated. After this patch, git grep '`+`,' -- Documentation should report noting. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01Update my e-mail addressJunio C Hamano1-1/+1
The old cox.net address is still getting mails from gitters. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-29Make it clear that push can take multiple refspecsAbhijit Menon-Sen1-8/+9
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-21Update my e-mail addressJunio C Hamano1-1/+1
The old cox.net address is still getting mails from gitters. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05manpages: italicize git command names (which were in teletype font)Jonathan Nieder1-2/+2
The names of git commands are not meant to be entered at the commandline; they are just names. So we render them in italics, as is usual for command names in manpages. Using doit () { perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }' } for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \ merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt do doit <"$i" >"$i+" && mv "$i+" "$i" done git diff . Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-01Documentation formatting and cleanupJonathan Nieder1-1/+1
Following what appears to be the predominant style, format names of commands and commandlines both as `teletype text`. While we're at it, add articles ("a" and "the") in some places, italicize the name of the command in the manual page synopsis line, and add a comma or two where it seems appropriate. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-01Documentation: be consistent about "git-" versus "git "Jonathan Nieder1-1/+1
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>
2008-06-21Correct documentation for git-push --mirrorShawn O. Pearce1-1/+2
This option behaves more like: git push $url +refs/*:refs/* than it does like: git push $url +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/* so we should document it to be more clear about that. Suggested-by: Marek Zawirski <marek.zawirski@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-08Docs: Use "-l::\n--long\n" format in OPTIONS sectionsStephan Beyer1-10/+13
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>
2008-06-06documentation: move git(7) to git(1)Christian Couder1-1/+1
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>
2008-05-23Merge branch 'pb/push'Junio C Hamano1-6/+7
* pb/push: add special "matching refs" refspec
2008-05-05Merge branch 'pb/remote-mirror-config'Junio C Hamano1-1/+3
* pb/remote-mirror-config: Add a remote.*.mirror configuration option
2008-05-04add special "matching refs" refspecPaolo Bonzini1-6/+7
This patch provides a way to specify "push matching heads" using a special refspec ":". This is useful because it allows "push = +:" as a way to specify that matching refs will be pushed but, in addition, forced updates will be allowed, which was not possible before. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-22Amend git-push refspec documentationSam Vilain1-10/+13
These paragraphs are a little confusing. Also, make it clearer when you have to specify the full name for <dst> Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20Add a remote.*.mirror configuration optionPaolo Bonzini1-1/+3
This patch adds a remote.*.mirror configuration option that, when set, automatically puts git-push in --mirror mode for that remote. Furthermore, the option is set automatically by `git remote add --mirror'. The code in remote.c to parse remote.*.skipdefaultupdate had a subtle problem: a comment in the code indicated that special care was needed for boolean options, but this care was not used in parsing the option. Since I was touching related code, I did this fix too. [jc: and I further fixed up the "ignore boolean" code.] Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19push: document the status outputJeff King1-0/+49
The output was meant to be a balance of self-explanatory and terse. In case we have erred too far on the terse side, it doesn't hurt to explain in more detail what each line means. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19Documentation/push: clarify matching refspec behaviorJeff King1-3/+3
The previous text was correct, but it was easy to miss the fact that we are talking about "matching" refs. That is, the text can be parsed as "we push the union of the sets of remote and local heads" and not "we push the intersection of the sets of remote and local heads". (The former actually doesn't make sense if you think about it, since we don't even _have_ some of those heads). A careful reading would reveal the correct meaning, but it makes sense to be as explicit as possible in documentation. We also explicitly use and introduce the term "matching"; this is a term discussed on the list, and it seems useful to for users to be able to refer to this behavior by name. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06Documentation: rename gitlink macro to linkgitDan McGee1-2/+2
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>
2007-11-14Merge branch 'aw/mirror-push' into jk/send-packJunio C Hamano1-0/+8
* aw/mirror-push: git-push: add documentation for the newly added --mirror mode Add tests for git push'es mirror mode git-push: plumb in --mirror mode Teach send-pack a mirror mode send-pack: segfault fix on forced push send-pack: require --verbose to show update of tracking refs receive-pack: don't mention successful updates more terse push output Conflicts: transport.c transport.h
2007-11-12git-push: add documentation for the newly added --mirror modeAndy Whitcroft1-0/+8
Add some basic documentation on the --mirror mode for git-push. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-11push: mention --verbose option in documentationSteffen Prohaska1-2/+2
Before this commit, only '-v' was documented. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-15Add a --dry-run option to git-push.Brian Ewins1-1/+4
The default behaviour of git-push is potentially confusing for new users, since it will push changes that are not on the current branch. Publishing patches that were still cooking on a development branch is hard to undo. It would also be nice to be able to verify the expansion of refspecs if you've edited them, so that you know what branches matched on the server. Adding a --dry-run flag allows the user to experiment safely and learn how to use git-push properly. Originally suggested by Steffen Prohaska. Signed-off-by: Brian Ewins <brian.ewins@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-18git-push: documentation and tests for pushing only branchesJeff King1-2/+2
Commit 098e711e caused git-push to match only branches when considering which refs to push. This patch updates the documentation accordingly and adds a test for this behavior. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-05Include a git-push example for creating a remote branchShawn O. Pearce1-0/+6
Many users get confused when `git push origin master:foo` works when foo already exists on the remote repository but are confused when foo doesn't exist as a branch and this form does not create the branch foo. This new example highlights the trick of including refs/heads/ in front of the desired branch name to create a branch. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-04Fixed git-push manpageJyotirmoy Bhattacharya1-1/+1
In git-push it is the remote repository and not the local repository which is fast forwarded. The description of the -f option in the git-push manpage gets it the other way round. Signed-off-by: Jyotirmoy Bhattacharya <jyotirmoy@jyotirmoy.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05Add urls.txt to git-clone man pageAndrew Ruder1-1/+1
Since git-clone is one of the many commands taking URLs to remote repositories as an argument, it should include the URL-types list from urls.txt. Split up urls.txt into urls.txt and urls-remotes.txt. The latter should be used by anything besides git-clone where a discussion of using .git/config and .git/remotes/ to name URLs just doesn't make as much sense. Signed-off-by: Andrew Ruder <andy@aeruder.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-09git-push: Update description of refspecs and add examplesJunio C Hamano1-3/+22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-07War on whitespaceJunio C Hamano1-1/+0
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>
2007-05-18Documentation: Reformatted SYNOPSIS for several commandsMatthias Kestenholz1-1/+3
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-19rename --exec to --receive-pack for push and send-packUwe Kleine-König1-2/+5
For now it's just to get a more descriptive name. Later we might update the push protocol to run more than one program on the other end. Moreover this matches better the corresponding config option remote.<name>. receivepack. --exec continues to work Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-19Update documentation of fetch-pack, push and send-packUwe Kleine-König1-1/+1
add all supported options to Documentation/git-....txt and the usage strings. Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16git-push documentation: remaining bitsJunio C Hamano1-1/+13
Mention --thin, --no-thin, --repo and -v. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-16document --exec for git-pushUwe Kleine-K,Av(Bnig1-1/+7
The text is just copied from git-send-pack.txt. Signed-off-by: Uwe Kleine-K,Av(Bnig <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-13git-push: document removal of remote ref with :<dst> pathspecJunio C Hamano1-6/+9
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-02git-push: allow -f as an alias for --forceJeff King1-1/+1
This was already documented in the options section of the manpage. This patch implements it, adds it to the usage message, and mentions it at the top of the manpage. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-09Assorted typo fixesPavel Roskin1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-09Remove trailing dot after short descriptionFredrik Kuivinen1-1/+1
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-21git-push: Update documentation to describe the no-refspec behavior.Carl Worth1-0/+6
It turns out that the git-push documentation didn't describe what it would do when not given a refspec, (not on the command line, nor in a remotes file). This is fairly important for the user who is trying to understand operations such as: git clone git://something/some/where # hack, hack, hack git push origin I tracked the mystery behavior down to git-send-pack and lifted the relevant portion of its documentation up to git-push, (namely that all refs existing both locally and remotely are updated). Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-06Docs: minor git-push copyeditingJ. Bruce Fields1-3/+3
Minor git-push copyediting Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-06Docs: move git url and remotes text to separate sectionsJ. Bruce Fields1-2/+3
The sections on git urls and remotes files in the git-fetch, git-pull, and git-push manpages seem long enough to be worth a manpage section of their own. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-06Docs: split up pull-fetch-param.txtJ. Bruce Fields1-1/+26
The push and pull man pages include a bunch of shared text from pull-fetch-param.txt. This simplifies maintenance somewhat, but there's actually quite a bit of text that applies only to one or the other. So, separate out the push- and pull/fetch-specific text into pull-fetch-param.txt and git-push.txt, then include the largest chunk of common stuff (the description of protocols and url's) from urls.txt. That cuts some irrelevant stuff from the man pages without making us duplicate too much. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-29Merge fixes up to GIT 1.1.6Junio C Hamano1-4/+4
2006-01-29git push -f documentationJ. Bruce Fields1-4/+4
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15git-push: fix --tags and document it.Junio C Hamano1-1/+6
Previously 'git-push --tags dst', used information from remotes/dst to determine which refs to push; this patch corrects it, and also documents the --tags option. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-05Documentation: push/receive hook references.Junio C Hamano1-0/+5
Mention documentation pages that talk about update and post-update hooks from git-push, because a frequently asked question is "I want X to happen when I push" and people would not know to look at git-receive-pack documentation until they understand that is what runs on the other end. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-19git-fetch/push/pull: documentation.Junio C Hamano1-0/+9
The documentation was lazily sharing the argument description across these commands. Lazy may be a way of life, but that does not justify confusing others ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-20[PATCH] Documentation: Update all files to use the new gitlink: macroSergey Vlasov1-1/+1
The replacement was performed automatically by these commands: perl -pi -e 's/link:(git.+)\.html\[\1\]/gitlink:$1\[1\]/g' \ README Documentation/*.txt perl -pi -e 's/link:git\.html\[git\]/gitlink:git\[7\]/g' \ README Documentation/*.txt Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07Big tool rename.Junio C Hamano1-0/+36
As promised, this is the "big tool rename" patch. The primary differences since 0.99.6 are: (1) git-*-script are no more. The commands installed do not have any such suffix so users do not have to remember if something is implemented as a shell script or not. (2) Many command names with 'cache' in them are renamed with 'index' if that is what they mean. There are backward compatibility symblic links so that you and Porcelains can keep using the old names, but the backward compatibility support is expected to be removed in the near future. Signed-off-by: Junio C Hamano <junkio@cox.net>