---
title: "Discussion on \"How To Change Master Branch To Main Branch Before Pushing Remotely To GitHub.\" | Hashnode"
description: "Discussion on \"How To Change Master Branch To Main Branch Before Pushing Remotely To GitHub.\". Photo by Zach Reiner on Unsplash\n  All new source code on GitHub is named \"main\" not \"master\" now.    I had a local-only project that had a \"master\" branch on it:\n\nI honestly don't remember how it happened, but irregardless, I wanted to change it to ..."
url: "https://hashnode.com/posts/how-to-change-master-branch-to-main-branch-before-pushing-remotely-to-github/608cde38dc886b4318004cb0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How To Change Master Branch To Main Branch Before Pushing Remotely To GitHub.](https://devduffy.hashnode.dev/how-to-change-master-branch-to-main-branch-before-pushing-remotely-to-github?utm_source=hashnode&utm_medium=feed)

Photo by Zach Reiner on Unsplash All new source code on GitHub is named "main" not "master" now. I had a local-only project that had a "master" branch on it: I honestly don't remember how it happened, but irregardless, I wanted to change it to ...

May 1, 2021 · 1 min read · devduffy.hashnode.dev  
Read the article

-   [#github](https://hashnode.com/tag/github)

## Written by

[Brendan Duffy](https://hashnode.com/@devduffy)

@devduffy

  
[View profile](https://hashnode.com/@devduffy)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
