Information Technology Reference
In-Depth Information
prints:
Novels
1974 | Carrie
1975 | Salem's Lot
1977 | The Shining
The two new novels you typed during Recipe 3-10:
1978 | The Stand
1979 | The Dead Zone
were not stored in the database. Do you remember? You forgot to commit the changes.
The changes typed in stephen-king.txt are lost and cannot be retrieved.
Display the contents of the new file:
$ cat graham-masterton.txt
The new file remained unchanged by $ git reset operation.
How It Works
The purpose of this recipe is to warn you that uncommitted changes can be lost. Re-
member that this command:
$ git reset --hard [REVISION]
can be safely used only in clean directories. The checkout command:
$ git checkout [REVISION]
is internally restricted. It can be used only if the operation does not cause data loss.
Whenever there is a risk of loosing uncommitted changes you will be warned and the
operation will be aborted. This is discussed in detail in Recipes 5-6 and 5-7.
3-11. Creating a git simple-commit alias
Search WWH ::




Custom Search