Information Technology Reference
In-Depth Information
The command:
$ git status -b
returns the information about the current branch. It outputs:
# Not currently on any branch.
when you are in a detached HEAD state or:
# On branch master
when you are in a normal state. You can join two useful switches -s and -b of a $
git status command:
$ git status -s -b
or even:
$ git status -sb
When the repository is clean and in a detached HEAD mode this command prints:
## HEAD (no branch)
While in a normal state the output is:
#master
If you are in a detached HEAD state you can return to the normal state with:
$ git checkout master
To summarize, the command:
$ git checkout [REVISION]
restores the working directory to the specified revision and enters the detached HEAD
state.
Search WWH ::




Custom Search