All the documentation I can find refers to HEAD
and I've heard numerous times that it's case sensitive.Yet I'm able to do things like,
git log head...merge_head
and it works just like
git log HEAD...MERGE_HEAD
Is this due to some customization in my local setup that I'm unaware of, or is it just an undocumented feature (maybe to discourage such practice)?
The difference between HEAD^ (Caret) and HEAD~ (Tilde) is how they traverse history backwards from a specified starting point, in this particular case HEAD .
- In other words; the head tag is used for document title, styling, scripts, etc. Whereas the header tag is used for headers as seen in articles.
When working with Git, only one branch can be checked out at a time - and this is what's called the "HEAD" branch. Often, this is also referred to as the "active" or "current" branch. Git makes note of this current branch in a file located inside the Git repository, in . git/HEAD .
The simple answer is that HEAD is a pointer/label to the most recent commit of the branch you are currently on. master is the default branch created when you initialized a git repository (e.g. git init ). You can delete the master branch (e.g. git branch -D master ). You cannot delete the HEAD pointer.
Case sensitivity depends on your system, HEAD is case-sensitive on Linux, insensitive on Windows (e.g. msysgit) an can be both on OSX depending of the file-system configuration (HFS+ is case-insensitive by default but when formatting you can also set it to case-sensitive). For instance, on Linux I get:
git log head
fatal: ambiguous argument 'head': unknown revision or path not in the working tree.
While git log HEAD
works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With