Active reading. Applied some formatting (as a result the diff looks much more extensive than it really is - use view "side-by-side markdown" to compare).
Source Link
Peter Mortensen
  • 29.1k
  • 21
  • 97
  • 124

Here are the steps to rename the branch:

1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>
  1. Switch to the branch which needs to be renamed
  2. git branch -m <new_name>
  3. git push origin :<old_name>
  4. git push origin <new_name>:refs/heads/<new_name>

EDIT  (12/01/2017)  : Make sure you run command git status and check that the newly created branch is pointing to its own ref and not the older one. If you find the reference to the older branch, you need to unset the upstream using:

git branch --unset-upstream

Here are the steps to rename the branch:

1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>

EDIT(12/01/2017)  : Make sure you run command git status and check that newly created branch is pointing to its own ref and not older one. If you find the reference to older branch, you need to unset the upstream using:

git branch --unset-upstream

Here are the steps to rename the branch:

  1. Switch to the branch which needs to be renamed
  2. git branch -m <new_name>
  3. git push origin :<old_name>
  4. git push origin <new_name>:refs/heads/<new_name>

EDIT  (12/01/2017): Make sure you run command git status and check that the newly created branch is pointing to its own ref and not the older one. If you find the reference to the older branch, you need to unset the upstream using:

git branch --unset-upstream
added 264 characters in body
Source Link
Milind Anantwar
  • 78.7k
  • 22
  • 92
  • 119

Here are the steps to rename the branch:

1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>

EDIT(12/01/2017) : Make sure you run command git status and check that newly created branch is pointing to its own ref and not older one. If you find the reference to older branch, you need to unset the upstream using:

git branch --unset-upstream

Here are the steps to rename the branch:

1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>

Here are the steps to rename the branch:

1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>

EDIT(12/01/2017) : Make sure you run command git status and check that newly created branch is pointing to its own ref and not older one. If you find the reference to older branch, you need to unset the upstream using:

git branch --unset-upstream
You're renaming the branch, not the repository.
Source Link
nickgrim
  • 5.3k
  • 1
  • 21
  • 27

Here are the steps to rename the repositorybranch:

1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>

Here are the steps to rename the repository:

1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>

Here are the steps to rename the branch:

1. switch to branch which needs to be renamed
2. git branch -m <new_name>
3. git push origin :<old_name>
4. git push origin <new_name>:refs/heads/<new_name>
Source Link
Milind Anantwar
  • 78.7k
  • 22
  • 92
  • 119
Loading