Date post: | 14-Jan-2017 |
Category: |
Technology |
Upload: | wojtek-ryrych |
View: | 70 times |
Download: | 0 times |
StatisticsUndoing changes in git
I. Undoing committed changes II. Reverting pushed changes III. Discarding local changes
How can I undo committed changes?
Mark
I don’t need this change!
Commit is no longer here!
To undo commited changes I will use `git reset --hard to_commit`
How can I revert pushed changes?
Mark, remove that feature
users don’t use the feature
Without the feature, users are
happy!
it was reverted
To revert public changes I will use `git revert commit`
How can I discard local changes?
Mark
Local changes have been discarded!
To discard local changes I will use`git checkout -- todo.txt`
I. Undoing committed changes II. Reverting pushed changes III. Discarding local changes
Use git
Thanks!