{"id":18046653,"url":"https://github.com/ltla/main2master","last_synced_at":"2025-04-05T04:25:00.222Z","repository":{"id":82716811,"uuid":"324502762","full_name":"LTLA/main2master","owner":"LTLA","description":"Convert your main branch back to its rightful name. ","archived":false,"fork":false,"pushed_at":"2020-12-26T07:34:04.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T12:29:33.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LTLA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-26T07:16:06.000Z","updated_at":"2020-12-26T18:14:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec97a6ec-db09-4867-810f-2224a78eb3b4","html_url":"https://github.com/LTLA/main2master","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LTLA%2Fmain2master","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LTLA%2Fmain2master/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LTLA%2Fmain2master/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LTLA%2Fmain2master/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LTLA","download_url":"https://codeload.github.com/LTLA/main2master/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247288250,"owners_count":20914327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T19:08:23.367Z","updated_at":"2025-04-05T04:25:00.192Z","avatar_url":"https://github.com/LTLA.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rename your `main` branch to `master`\n\nRecently, GitHub decided to name the default branch upon new repository creation to `main`, in response to... diversity or social justice or blah blah blah.\nI won't go over why I think this is a stupid idea - that has been covered exhaustively in a million threads on Twitter, Reddit, GitHub itself, etc. - but suffice to say, I don't like it.\nSo I wrote this little script to convert everything back to the way it should be:\n\n```sh\n./main2master user/repo PAT\n```\n\nThis will make a `master` branch from your existing `main`, push the former up, and delete the latter.\nAn easy way to restore sanity if your overly woke colleagues or collaborators got a little bit too excited about the power of version control to... end racism.. or something.\n\n**To do:**\n\n- Replicate branch protection in the new `master`.\n- Figure out how to do the deletion without a PAT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltla%2Fmain2master","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltla%2Fmain2master","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltla%2Fmain2master/lists"}