In addition to the other comments, you may find the -m (move) switch to git-branch helpful. You could rename your old master to something else, then rename your new branch to master:
git branch -m master crap_work
git branch -m previous_master master
More Related Contents:
- Git fetch remote branch
- Showing which files have changed between two revisions
- Branch from a previous commit using Git
- How do I clone a single branch in Git?
- How to find the nearest parent of a Git branch
- How to fetch all Git branches
- How can I get a list of Git branches, ordered by most recent commit?
- Git – how to force merge conflict and manual merge on selected file
- master branch and ‘origin/master’ have diverged, how to ‘undiverge’ branches’?
- Difference between git checkout –track origin/branch and git checkout -b branch origin/branch
- View a file in a different Git branch without changing branches
- How to determine when a Git branch was created?
- How do I delete all Git branches which have been merged?
- How do I remove local (untracked) files from the current Git working tree?
- Reordering of commits
- Depend on a branch or tag using a git URL in a package.json?
- Git push: “fatal ‘origin’ does not appear to be a git repository – fatal Could not read from remote repository.”
- Dynamically Fill Jenkins Choice Parameter With Git Branches In a Specified Repo
- Git commits are duplicated in the same branch after doing a rebase
- Switch Git branch without files checkout
- Which characters are illegal within a branch name?
- Git: How to find out on which branch a tag is?
- Pull all commits from a branch, push specified commits to another
- Renaming a branch in GitHub
- Git: Merge a Remote branch locally
- Git rebase branch with all parent branches (or dependent sub-branches)
- Get all files that have been modified in git branch
- Git and working on multiple branches
- Can git permanently ignore a remote branch?
- Line endings messed up in Git – how to track changes from another branch after a huge line ending fix?