Does this have any impact on branches that may be currently taken from master? In other words, say I have a branch issue-14 where I'm actively developing, and when I'm done, it will be merged back into the default branch. Would I need to wait until I'm done with that branch before change the default branch's name?
(I'm not a git guru; I use it a good bit, but this isn't an issue I've tackled before)
I had an active branch (not pushed to github) while I changed the default branch and experienced no issues when I submitted the pull request after I completed the conversion to main.
That said, once my local environment was converted to main, I rebased my active branch with main before pushing it up. But even if I had a PR up before the conversion I should have been able to change the branch target in the github ui.
Let me know if you run into any issues and I'd be happy to help debug the issues!
I think I got it. git rebase --onto main just rewound the HEAD revision, but then GitHub Desktop told me I had commits to push and pull; once I did that, everything looks peachy. (Maybe leaving out --onto would have made it one step...)
Now, once GitHub changes GitHub Pages to work from the default branch (which I imagine has to be something they'll do soon, since they're all in on this), I can completely remove it.
Branches are really just labels git puts on objects and updates every time you commit on them. When you branch off, you're branching from a commit, not from another branch. When merging two branches, git doesn't care about their names either, just about the latest commit they have in common, which doesn't change with a rename.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Does this have any impact on branches that may be currently taken from
master
? In other words, say I have a branchissue-14
where I'm actively developing, and when I'm done, it will be merged back into the default branch. Would I need to wait until I'm done with that branch before change the default branch's name?(I'm not a git guru; I use it a good bit, but this isn't an issue I've tackled before)
I had an active branch (not pushed to github) while I changed the default branch and experienced no issues when I submitted the pull request after I completed the conversion to
main
.That said, once my local environment was converted to
main
, I rebased my active branch withmain
before pushing it up. But even if I had a PR up before the conversion I should have been able to change the branch target in the github ui.Let me know if you run into any issues and I'd be happy to help debug the issues!
I think I got it.
git rebase --onto main
just rewound theHEAD
revision, but then GitHub Desktop told me I had commits to push and pull; once I did that, everything looks peachy. (Maybe leaving out--onto
would have made it one step...)Now, once GitHub changes GitHub Pages to work from the default branch (which I imagine has to be something they'll do soon, since they're all in on this), I can completely remove it.
Branches are really just labels git puts on objects and updates every time you commit on them. When you branch off, you're branching from a commit, not from another branch. When merging two branches, git doesn't care about their names either, just about the latest commit they have in common, which doesn't change with a rename.