Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6318927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:42:53+00:00 2026-05-24T15:42:53+00:00

I have 2 git branches: master and experimental. Experimental became good, I want to

  • 0

I have 2 git branches: master and experimental.

Experimental became good, I want to make it the master. I figured I would rename to shuffle things around, but here is what I got:

nutebook:Stuff nathan$ git remote rename master old
error: Could not rename config section 'remote.master' to 'remote.old'

I use GitHub and Git-Tower.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T15:42:54+00:00Added an answer on May 24, 2026 at 3:42 pm

    The following is a guide to rename your master branch. It will work just as easily to rename your experimental branch.

    Here’s how I did the renaming.

    First, in your working tree, locally rename master to something
    else.

    git branch -m master old-dev
    

    Renaming a branch does work while you are on the branch, so
    there’s no need to checkout something else.

    Then, locally rename the maintenance branch (2.63-branch) to
    master:

    git branch -m 2.63-branch master
    

    Now, time to mess with the remote. Just in case you screw up, you
    might want to make sure you have a current backup. First, delete the
    remote’s master:

    git push origin :master
    

    And now, give the remote your new master:

    git push origin master:refs/heads/master
    

    Update: When creating a new branch, the refs/heads/ prefix is
    needed on the remote side. If the branch already exists (as master did
    above) only the branch name is required on the remote side.

    … and your now-renamed old master:

    git push origin old-dev:refs/heads/old-dev
    

    Finally, delete the old name of your maintenance branch to prevent
    confusion:

    git push origin :2.63-branch
    

    Clients will now get the ‘new’ master branch when they pull.

    see this site.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a couple of Git branches: 'experimental', 'something' and 'master'. I switched to
Say I have these git branches: master branchone I want to do this, keeping
I have a git repository (at github.com) with two branches: master and gh-pages. I
I have a git repo which has a few branches - there's the master
I have a rather large diff of 2 GIT branches and would like to
So I have 3 git branches: master refresh auth_upgrade I haven't really been using
I have a Git repository with two branches: master and redesign . The redesign
I am a relative beginner at git - I have two branches: master and
I have two branches:master and v2. I want to merge v2 in master so
I have two branches: master and experimental . I'd like to rebase the changes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.