First checkout to the branch which you want to rename:
1 2 3 |
git branch -m old_branch new_branch git push -u origin new_branch |
To remove an old branch from remote:
1 |
git push origin :old_branch |
We at Progos are a dynamic and progressive team who are dedicated to provide you with quality Information Technology solutions and services.
We deliver cost-efficient bespoke portal solutions to help you accomplish your strategic targets. Liferay Portal, created for enterprise use, provides a virtual area where you can centralize, collaborate and share. User interface developed in Liferay Portal is built keeping end user in mind and even a technically ignorant user can understand it easily.
We develop websites through Magnolia, a java based CMS with advanced & seamless integration.Magnolia is a digital business platform with a CMS at its core. Stand out features includes its personalisation functionality and its ability to integrate with other systems. As experts in technology, contact Progos today for advice on the best CMS to meet your business requirements.
At Progos, we have a longstanding experience in delivering customer-focused and business oriented Java Development outsourcing services for small, medium and large organizations.
Our teams possess in-depth knowledge, technical know-how and we always delivered quality and scalable Java applications across diverse business domains.
First checkout to the branch which you want to rename:
1 2 3 |
git branch -m old_branch new_branch git push -u origin new_branch |
To remove an old branch from remote:
1 |
git push origin :old_branch |
1 2 |
for t in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin/tags); do git tag ${t/origin\/tags\/} $t && git branch -D -r $t; done for b in $(git for-each-ref --format='%(refname:short)' refs/remotes); do git branch ${b/origin\/} refs/remotes/$b && git branch -D -r $b; done |
Read more Remove origin from branch name
1 2 3 4 5 6 7 8 |
for name in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin); do [ "$name" = origin/HEAD ] && continue branch=${name#origin/} git checkout $branch cp /<gitignore path>/.gitignore ./ git add .gitignore git commit -m 'adding gitignore' done |
Read more Add .gitignore across all branches