Advertisement
Lio-code

03 - Git : undo !

Mar 5th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git log --oneline
  2. 59e2573 (HEAD -> master) ajout d un second paragraphe
  3. ece83a9 ajout de paragraphe
  4. 9b36e8d crea fichier et modif titre
  5. a95e1b7 création de index puis modif title
  6. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ ^C
  7. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ ^C
  8. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ ^C
  9. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git revert ece83a9
  10. error: could not revert ece83a9... ajout de paragraphe
  11. hint: after resolving the conflicts, mark the corrected paths
  12. hint: with 'git add <paths>' or 'git rm <paths>'
  13. hint: and commit the result with 'git commit'
  14. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git status
  15. On branch master
  16. You are currently reverting commit ece83a9.
  17. (fix conflicts and run "git revert --continue")
  18. (use "git revert --abort" to cancel the revert operation)
  19.  
  20. Unmerged paths:
  21. (use "git reset HEAD <file>..." to unstage)
  22. (use "git add <file>..." to mark resolution)
  23.  
  24. both modified: index.html
  25.  
  26. no changes added to commit (use "git add" and/or "git commit -a")
  27. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git revert --qbort
  28. usage: git revert [<options>] <commit-ish>...
  29. or: git revert <subcommand>
  30.  
  31. --quit end revert or cherry-pick sequence
  32. --continue resume revert or cherry-pick sequence
  33. --abort cancel revert or cherry-pick sequence
  34. -n, --no-commit don't automatically commit
  35. -e, --edit edit the commit message
  36. -s, --signoff add Signed-off-by:
  37. -m, --mainline <parent-number>
  38. select mainline parent
  39. --rerere-autoupdate update the index with reused conflict resolution if possible
  40. --strategy <strategy>
  41. merge strategy
  42. -X, --strategy-option <option>
  43. option for merge strategy
  44. -S, --gpg-sign[=<key-id>]
  45. GPG sign commit
  46.  
  47. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git revert --abort
  48. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git status
  49. On branch master
  50. nothing to commit, working tree clean
  51. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git log --oneline
  52. 59e2573 (HEAD -> master) ajout d un second paragraphe
  53. ece83a9 ajout de paragraphe
  54. 9b36e8d crea fichier et modif titre
  55. a95e1b7 création de index puis modif title
  56. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git revert ^C
  57. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git revert 9b36e8d
  58. [master 23fc786] Revert "crea fichier et modif titre"
  59. 1 file changed, 1 insertion(+), 1 deletion(-)
  60. wilder@wilder-ThinkPad-T440p:~/sharezza-oops$ git log --oneline
  61. 23fc786 (HEAD -> master) Revert "crea fichier et modif titre"
  62. 59e2573 ajout d un second paragraphe
  63. ece83a9 ajout de paragraphe
  64. 9b36e8d crea fichier et modif titre
  65. a95e1b7 création de index puis modif title
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement