Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
karatinversion
· 1y ago · 0 comments
You are looking for
git update-ref <branch-name> <commit-sha>
Comments
[–]
DiggyJohnson
1y ago
Wouldn't the fail or break under any circumstance where they don't immediately share a history?
[–]
karatinversion
OP
1y ago
I just tested it by creating a repo with two branches without a common ancestor, and I was able to move a branch pointer to either history with update-ref, so no, I don't think so