How to Fix the "Detached HEAD" State in Gitby@marcinwosinek
309 reads

How to Fix the "Detached HEAD" State in Git

tldt arrow
Read on Terminal Reader

Too Long; Didn't Read

A common source of confusion when using Git is not knowing what it all means. Git commits are immutable, meaning you can create new ones, but what’s already inside will never be changed. The only way of making changes to the repository is by creating new commits. Git doesn’t have a branch to update when you create a new commit, so all the commits you a create there are **stored** but are dangling. At some point, the garbage collector will remove them permanently from the repository.

Company Mentioned

Mention Thumbnail
featured image - How to Fix the "Detached HEAD" State in Git
Marcin Wosinek HackerNoon profile picture

@marcinwosinek

Marcin Wosinek

Learn More
LEARN MORE ABOUT @MARCINWOSINEK'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart
Marcin Wosinek HackerNoon profile picture
by Marcin Wosinek @marcinwosinek.I'm a JavaScript developer. I'm here to teach you useful skills, so you can succeed in your work & private projects.
Newsletter

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa