lter / lterwg-som

Soil Organic Matter Synthesis working group
https://lter.github.io/som-website/
8 stars 6 forks source link

rename master to main #77

Closed wwieder closed 4 years ago

wwieder commented 4 years ago

Trying to rename master to main with the steps below, but unable to remove master branch I also don't want to mess with workflow from others... @srearl can you advise?

git branch -m master main git push -u origin main git branch -d origin/master git branch -u main origin/main git branch -u origin/main main

wwieder commented 4 years ago

here's how to update local clones (from https://www.git-tower.com/learn/git/faq/delete-remote-branch)

git checkout master git branch -m master main git fetch git branch --unset-upstream git branch -u origin/main git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

@j-am-moore @katerina-georgiou @avnimalhotra @piersond @bsulman @srweintraub I've renamed master on this repo to main I think the steps above should help you do the same on your local repos or clones. Plus, this will hopefully be useful for other repos that you're working with :)

srearl commented 4 years ago

@wwieder - Looks like you did it successfully, and I am seeing main as one step ahead of master. At this point, should just need to delete master from GitHub but let us double-check with @brunj7 just to be sure.

wwieder commented 4 years ago

I get the following error when I try to do this

git branch -d origin/master error: branch 'origin/master' not found.

wwieder commented 4 years ago

simililarly git push origin --delete origin/master error: unable to delete 'origin/master': remote ref does not exist error: failed to push some refs to 'https://github.com/lter/lterwg-som.git'

wwieder commented 4 years ago

ahhh!
git push origin --delete master

wwieder commented 4 years ago

I'm going to leave this issue open since there are ways for others to update their clones here too

srearl commented 4 years ago

looks good