summaryrefslogtreecommitdiff
path: root/git-reset-script
AgeCommit message (Collapse)Author
2005-08-15Audit rev-parse users.Junio C Hamano
Make sure that we say --verify when we want to get a single SHA1 name. Also when we say --verify, --revs-only is redundant. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-10Stash away the original head in ORIG_HEAD when resetting.Junio C Hamano
When rewinding the head, stash away the value of the original HEAD in ORIG_HEAD, just like git-resolve-script does. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-07[PATCH] Extend "git reset" to take a reset pointLinus Torvalds
This was triggered by a query by Sam Ravnborg, and extends "git reset" to reset the index and the .git/HEAD pointer to an arbitrarily named point. For example git reset HEAD^ will just reset the current HEAD to its own parent - leaving the working directory untouched, but effectively un-doing the top-most commit. You might want to do this if you realize after you committed that you made a mistake that you want to fix up: reset your HEAD back to its previous state, fix up the working directory and re-do the commit. If you want to totally un-do the commit (and reset your working directory to that point too), you'd first use "git reset HEAD^" to reset to the parent, and then do a "git checkout -f" to reset the working directory state to that point in time too. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-08Add "git-sh-setup-script" for common git shell script setupLinus Torvalds
It sets up the normal git environment variables and a few helper functions (currently just "die()"), and returns ok if it all looks like a git archive. So use it something like . git-sh-setup-script || die "Not a git archive" to make the rest of the git scripts more careful and readable.
2005-06-21Remove MERGE_HEAD in "git checkout/reset"Linus Torvalds
Both of these scripts will end up resetting the index to some specific head, and any unresolved merge will be forgotten.
2005-06-15Trivial git script fixupsLinus Torvalds
Fix permissions, and add trivial "reset" and "add" scripts. The "reset" script just resets the index back to head, while the "add" script is just a crutch for people used to do "cvs add".