Cjku/git: Difference between revisions

199 bytes added ,  30 October 2014
Line 341: Line 341:
# soft option: change the referee of the current branch
# soft option: change the referee of the current branch
#* index file and working directory keep untouched.
#* index file and working directory keep untouched.
#* scenario: squash.
#* scenario: squash change in several commits into one commit so that people think you are smart.  
# mixed option: soft criteria; regenerate index according to the new tree.
# mixed option: soft criteria; Plus, regenerate index according to the new tree.
#* working directory keeps untouched.
#* working directory keeps untouched.
#* scenario: cherry-pick.
#* scenario: slice a single big commit to different small commits to haste review process.
# hard option: mixed criteria; Overwrite all '''modified''' tracked files in working directory. (Note: only tracked and dirty files will be overwritten by hard-reset. Unchanged and untracked files are out of scope)
# hard option: mixed criteria; Plus, overwrite all '''modified''' tracked files in working directory. (Note: only tracked and dirty files will be overwritten by hard-reset. Unchanged and untracked files are out of scope)
#* scenario: Overtime working, did lots of stupid things
#* scenario: overtime working, did lots of stupid things. You don't want to face what had done...
#* scenario: clearing out failed or stale merge
#* scenario: recover context before a stale merge


Another usage of reset is to reset paths:  
Another usage of reset is to reset paths:  
Confirmed users
1,643

edits