Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOTICE: Primary branch switched to main #299

Closed
scrthq opened this issue Jun 27, 2020 · 4 comments
Closed

NOTICE: Primary branch switched to main #299

scrthq opened this issue Jun 27, 2020 · 4 comments

Comments

@scrthq
Copy link
Member

scrthq commented Jun 27, 2020

Background + Details around why:

CC @FISHMANPET @WJurecki

@scrthq scrthq self-assigned this Jun 27, 2020
@scrthq scrthq pinned this issue Jun 27, 2020
@scrthq scrthq changed the title NOTICE: Primary branch will be switched to main NOTICE: Primary branch switched to main Jun 27, 2020
@scrthq scrthq closed this as completed Jun 27, 2020
@FISHMANPET
Copy link
Collaborator

FYI I followed the instructions in the first link with my fork and got myself into a bit of a pickle, as someone that's not super familiar with Git and was just copy and pasting commands.

After I did the things mentioned in that first piece (and specifically git branch -m master main) I ended up with main being my default branch according to GitHub Desktop, but everytime I deleted master in GitHub, GitHub Desktop had me republish my main and it would create a master again in my fork. The GitHub Desktop client was also sort of acting like master was my default - it explicitly said main was my default, but the menus still said "Update from master" rather than "Update from main." Based on someone reporting the same issue with GitHub Desktop I used some of the troubleshooting steps there, and found that my local main was pointing to remote master (notice Local branches configured for 'git pull':).

PS C:\Users\bajurny\Documents\GitHub\PSGSuite> git remote show origin
* remote origin
  Fetch URL: https://github.com/FISHMANPET/PSGSuite.git
  Push  URL: https://github.com/FISHMANPET/PSGSuite.git
  HEAD branch: main
  Remote branches:
    feature/ContactMgmt_issue53          tracked
    feature/add_ConfigName_parameter     tracked
    feature/sheets_batch_update          tracked
    feature/use_queues_for_Drive_uploads tracked
    feature_requests_125_150_152         tracked
    gh-pages                             tracked
    gsheets                              tracked
    main                                 tracked
    master                               tracked
  Local branches configured for 'git pull':
    gsheets merges with remote gsheets
    main    merges with remote master
  Local refs configured for 'git push':
    gsheets pushes to gsheets (up to date)
    main    pushes to main    (up to date)

I found the result in the script posted in the second link. I needed to run this to update local main to pull from remote main:

git push origin -u ${DEFAULT}

Not sure if I could have done that instead of git push origin HEAD mentioned in the first article.

So maybe this information will be useful for others.

@scrthq
Copy link
Member Author

scrthq commented Jul 2, 2020

Thanks for the diligence here @FISHMANPET ! ♥️ I should have probably clarified that this really only affects the target branch you're submitting your PRs for, what you have in your fork doesn't need to line up exactly 🙂

@FISHMANPET
Copy link
Collaborator

I figured I'd give it a try here since I know I'll be doing it for other repos I own, and if I screwed up my fork badly enough I could just delete it and start over. It's the kind of thing I suspect lots of people will be doing so the more information on how to do it safely the better!

@scrthq
Copy link
Member Author

scrthq commented Jul 2, 2020

Very fair! ♥️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants