By default, git branches are now called: main, in the past they were called master. This may result in potential discrepancies (if the branch name you are pushing (local) does not match the remote (origin) branch name). You may need to rename your local branch to ensure that it matches the remote branch name. How to rename a git branch (while current branch): **git branch -M main**
If you encounter the error below, make sure you first make one commit. error: refname refs/heads/master not found fatal: Branch rename failed
How to Rename Git / GitHub branch

Written by:
Eugene Yeboah • December 18, 2021
