path: root/Documentation/git-reset.txt
AgeCommit message (Collapse)Author
2009-08-15Implement 'git reset --patch'Thomas Rast
This introduces a --patch mode for git-reset. The basic case is git reset --patch -- [files...] which acts as the opposite of 'git add --patch -- [files...]': it offers hunks for *un*staging. Advanced usage is git reset --patch <revision> -- [files...] which offers hunks from the diff between the index and <revision> for forward application to the index. (That is, the basic case is just <revision> = HEAD.) Signed-off-by: Thomas Rast <> Signed-off-by: Junio C Hamano <>
2008-12-29Merge branch 'lt/reset-merge'Junio C Hamano
* lt/reset-merge: Document "git-reset --merge" Add 'merge' mode to 'git reset'
2008-12-19Documentation: sync example output with git outputMarkus Heidelberg
Don't confuse the user with old git messages. Signed-off-by: Markus Heidelberg <> Signed-off-by: Junio C Hamano <>
2008-12-17doc/git-reset: add reference to git-stashMarkus Heidelberg
The "Interrupted workflow" situation is a good example for using git-stash. Signed-off-by: Markus Heidelberg <> Signed-off-by: Junio C Hamano <>
2008-12-10Document "git-reset --merge"Junio C Hamano
The commit log message for the feature made it sound as if this is a saner version of --mixed, but the use case presented makes it clear that it is a better variant of --hard when your changes and somebody else's changes are mixed together. Perhaps we would want to rewrite the example that shows the use of --hard not to talk about recovering from a failed merge? Signed-off-by: Junio C Hamano <>
2008-09-16Documentation: Refer to git-rebase(1) to warn against rewritingThomas Rast
This points readers at the "Recovering from upstream rebase" warning in git-rebase(1) when we talk about rewriting published history in the 'reset', 'commit --amend', and 'filter-branch' documentation. Signed-off-by: Thomas Rast <> Signed-off-by: Junio C Hamano <>
2008-07-21Update my e-mail addressJunio C Hamano
The old address is still getting mails from gitters. Signed-off-by: Junio C Hamano <>
2008-07-05manpages: italicize git command names (which were in teletype font)Jonathan Nieder
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 <> Signed-off-by: Junio C Hamano <>
2008-07-02Documentation formatting and cleanupJonathan Nieder
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 <> Signed-off-by: Junio C Hamano <>
2008-06-06documentation: move git(7) to git(1)Christian Couder
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 <> Signed-off-by: Junio C Hamano <>
2008-02-16Documentation/git-reset: Add an example of resetting selected pathsPieter de Bie
Signed-off-by: Pieter de Bie <> Signed-off-by: Junio C Hamano <>
2008-02-16Documentation/git-reset: don't mention --mixed for selected-paths resetPieter de Bie
The option is accepted, but that is the only form selected-paths variant of the reset command takes, so there is no point mentioning it. And while we're at it, use the dashless git call. Signed-off-by: Pieter de Bie <> Signed-off-by: Junio C Hamano <>
2008-02-16Documentation/git-reset:Junio C Hamano
Since 3368d11 (Remove unnecessary git-rm --cached reference from status output), the status output marks the "Added but not yet committed" section as "Changes to be committed". Signed-off-by: Junio C Hamano <>
2008-01-07Documentation: rename gitlink macro to linkgitDan McGee
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 <> Signed-off-by: Junio C Hamano <>
2008-01-05Document git-reset defaults to HEAD if no commit is givenMarco Costalba
Signed-off by: Marco Costalba <> Signed-off-by: Junio C Hamano <>
2007-11-06git-reset: add -q option to operate quietlyGerrit Pape
Many git commands have a -q option to suppress output to stdout, let's have it for git-reset too. This was asked for by Joey Hess through Signed-off-by: Gerrit Pape <> Signed-off-by: Junio C Hamano <>
2007-11-02Documentation: quote commit messages consistently.Sergei Organov
Documentation quotes commit messages 14 times with double-quotes, and 7 times with single-quotes. The patch turns everything to double-quotes. A nice side effect is that documentation becomes more Windoze-friendly as AFAIK single quotes won't work there. Signed-off-by: Sergei Organov <> Signed-off-by: Junio C Hamano <>
2007-08-02Try to be consistent with capitalization in the documentationSteve Hoelzer
Signed-off-by: Steve Hoelzer <> Signed-off-by: Junio C Hamano <>
2007-04-24Documentation/git-reset.txt: suggest git commit --amend in example.Gerrit Pape
In example 'Undo a commit and redo', refer to 'git commit --amend', as this is the easier alternative. Signed-off-by: Junio C Hamano <>
2007-02-17Convert update-index references in docs to add.Shawn O. Pearce
Since `git add` is the approved porcelain for an end-user to invoke when they want to manipulate the index, porcelain documentation should steer the user to this command rather than the pure plumbing update-index. Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2007-01-15Documentation: merge-output is not too verbose now.Junio C Hamano
We've squelched output from merge-recursive, and git-merge when used with recursive does not attempt the trivial one first anymore, so there won't be "Trying ... Nope." messages now. Signed-off-by: Junio C Hamano <>
2006-12-26Document git-reset <commit> -- <paths>...Junio C Hamano
2006-12-16Align section headers of 'git status' to new 'git add'.Shawn O. Pearce
Now that 'git add' is considered a first-class UI for 'update-index' and that the 'git add' documentation states "Even modified files must be added to the set of changes about to be committed" we should make the output of 'git status' align with that documentation and common usage. So now we see a status output such as: # Added but not yet committed: # (will commit) # # new file: x # # Changed but not added: # (use "git add file1 file2" to include for commit) # # modified: x # # Untracked files: # (use "git add" on files to include for commit) # # y which just reads better in the context of using 'git add' to manipulate a commit (and not a checkin, whatever the heck that is). We also now support 'color.status.added' as an alias for the existing 'color.status.updated', as this alias more closely aligns with the current output and documentation. Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2006-06-04Documentation: Spelling fixesHorst H. von Brand
Signed-off-by: Horst H. von Brand <> Signed-off-by: Junio C Hamano <>
2006-05-05Several trivial documentation touch ups.sean
Move incorrect asciidoc level 2 titles back to level 1. Show output of git-name-rev in man page example. Reword sentences that begin with a period (.) in asciidoc numbered lists to work around conversion to man page bug. Mention that git-repack now calls git-prune-packed when the -d option is passed to it. [imap] section headers in the config file example need to be contained in a literal block. imap.pass is the proper config file variable to use, not imap.password. Signed-off-by: Sean Estabrooks <> Signed-off-by: Junio C Hamano <>
2006-04-28Fix up remaining man pages that use asciidoc "callouts".Sean Estabrooks
Unfortunately docbook does not allow a callout to be referenced from inside a callout list description. Rewrite one paragraph in git-reset man page to work around this limitation. Signed-off-by: Sean Estabrooks <>
2006-03-09Remove trailing dot after short descriptionFredrik Kuivinen
Signed-off-by: Fredrik Kuivinen <> Signed-off-by: Junio C Hamano <>
2006-01-22Minor git-reset and git-commit documentation fixesJ. Bruce Fields
Minor copyediting of recent additions to git-commit and git-reset documentation. Signed-off-by: J. Bruce Fields <> Signed-off-by: Junio C Hamano <>
2006-01-13Documentation: git-reset - interrupted workflow.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2005-12-17Examples of resetting.Junio C Hamano
Morten Welinder says examples of resetting is really about recovering from botched commit/pulls. I agree that pointers from commands that cause a reset to be needed in the first place would be very helpful. Also reset examples did not mention "pull/merge" cases. Signed-off-by: Junio C Hamano <>
2005-12-13Documentation: more examples.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2005-11-21git-reset.txt: Small fix + clarifications.Andreas Ericsson
This basically translates the man-page from 'git-developerish' to plain english, adding some almost-sample output from git-status so users can recognize what will happen. Also mention explicitly that --mixed updates the index, while --soft doesn't. I understood the old text to mean "--mixed is exactly like --soft, but verbose". Signed-off-by: Andreas Ericsson <> Signed-off-by: Junio C Hamano <>
2005-09-20[PATCH] Documentation: Update all files to use the new gitlink: macroSergey Vlasov
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 <> Signed-off-by: Junio C Hamano <>
2005-09-08Big tool rename.Junio C Hamano
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 <>