Skip to Content
Git: Mastering Version Control
book

Git: Mastering Version Control

by Ferdinando Santacroce, Aske Olsson, Rasmus Voss, Jakub Narębski
October 2016
Beginner
861 pages
20h 37m
English
Packt Publishing
Content preview from Git: Mastering Version Control

Amending history without rewriting

What to do if what you need to fix is in the published part of the history? As described in Perils of rewriting published history section, changing the parts of the history that were made public (which is actually creating a changed copy and replacing references) can cause problems for downstream developers. You better not to touch this part of the graph of revisions.

There are a few solutions to this problem. The most commonly used is to put a new fixup commit with appropriate changes (for example, a typo fix in a documentation). If you need to remove changes, deciding that they turned out to be bad to have, you can create a commit to revert the changes.

If you fix a commit or revert one, it would be nice to annotate ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
Git Pocket Guide

Git Pocket Guide

Richard E. Silverman

Publisher Resources

ISBN: 9781787123205Supplemental Content