Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
assbuttbuttass
8 months ago
|
parent
|
context
|
favorite
| on:
Oh Shit, Git?
> is there a command that simply moves a branch from one commit to another without changing anything else? It feels like it should be possible given how git works.
git switch -C master HEAD~
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
git switch -C master HEAD~