Information Technology Reference
In-Depth Information
$ git status -sb
The output conveys the answers to the following questions:
• Is the repository clean or dirty? In other words, are there any uncommitted
changes?
• IstherepositoryinadetachedHEADstate?Ormaybeweareonabranch?
If so, print the name of the branch.
3-8. Working with reflog
Problem
The procedure of saving the log with SHA-1 names, which was necessary in Recipes
3-5 and 3-6, is very cumbersome. If you know how to use reflog this can be avoided.
You will want to create a repository as shown in Figure 3-9 . Next, you want to restore
the working directory to every commit with the $ git reset --hard
[REVISION] command. Instead of copying and pasting SHA-1 names you may
prefer to use reflog.
 
 
Search WWH ::




Custom Search