Skip to content

I noticed a small inacuracy on Chapter 4: Reverting and rolling back commits #3

Open
@shapeous

Description

@shapeous

I noticed a small inaccuracy on Chapter 4: Reverting and rolling back commits. In development reverts and rollbacks are interchangeable concepts. They both mean the same thing, namely to undo or back out changes. Rollbacks tend to be used in the context of SQL changes or rolling back transactions, where are reverts tends to be used in the context of code committed to a SCMs such as CVS or SVN. To revert a commit means to undo the effect of adding the changes on that commit, so if we undo the Third commit, it will automatically delete and stage the deletion of add.txt, but it will leave it up to us to resolve list.txt. You can see this by running "git status" on the command line right after. Unfortunately, GIT does a poor job on merging the changes and indicating the conflict, It isn't clear what it is doing and so I understand the misunderstanding. However since we are undoing the effect of making the Third commit we need to delete the line "This is the third commit".

In regards to "Roll Back to this commit" in the context of the Second commit, it means to undo all changes since the second commit. The program could have instead used "revert" here, but it might have read something like "revert to this commit" instead. I do not know why git decided to use two terms that mean the exact thing in their tool... Either way, this is a simpler merge and git is able to handle it better by deleting add.txt, updating list.txt and automatically committing the change. I documented this (on two appropriately named branches) on my own repo at https://github.com/shapeous/backout/tree/master. BTW, I am a developer, but please don't take that against me. I really appreciate your course and how well you covered the material and so I wrote a very positive review. I still have chapter 5 to go, but I already feel more comfortable in git thanks to your great teaching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions