October 2016
Beginner
861 pages
20h 37m
English
In the previous examples, we assumed that the working tree was clean, that is, no tracked files are in the modified state. However, this is not always the case, and if a hard reset is done, the changes to the modified files will be lost. Fortunately, Git provides a smart way to quickly put stuff away so that it can be retrieved later using the git stash command.
Again, we'll use the example of the hello world repository. Make a fresh clone of the repository, or reset the master branch if you have already cloned.
We can create the fresh clone as follows:
$ git clone https://github.com/dvaske/hello_world_cookbook.git $ cd hello_world_cookbook
We can reset the existing clone as follows:
$ cd hello_world_cookbook ...