Comment by blharr
1 day ago
Such a simple operation, but it'd probably fix 95% of problems I've had with git.
"Uh oh, I tried to checkout a branch from remote by doing `git checkout origin/some-branch` instead of `git checkout some-branch` and made a couple source changes. Now I'm in detached head state. What is detached head ? I have to stash my revisions? Can I make a new branch with the same name or do I need to delete the origin/some-branch that I'm on?"
When you could be able to just revert the "operation" and check out the correct branch, that's amazing.
No comments yet
Contribute on Hacker News ↗