How do I rename a local Git branch?
Stack How?
Stackorigin – The Community of Question and Answers Latest Articles
Read More About Python List Comprehension with examples
Python List Comprehension: Python List comprehension provides a much more short syntax for creating a new list based on the values of an existing list. Advantages of List Comprehension in Python: Time Efficient than loop Space Efficient than loop Needs ...
Do not accept an offer letter from companies.
Do not accept an offer letter from companies without verifying the following points. Designation Salary Details & CTC Distribution Leave Policies Working Hours & Days Medical Coverage/Insurance Probation Period Notice Period Benefits and Perks Bonus F&F Policy
How to call API using Ajax
AJAX stands for Asynchronous JavaScript and XML and its used for to make calls to the server to fetch some data. In this article, we will learn how to implement a simple API call using AJAX technology. How to use GET ...
To rename a branch while pointed to any branch:
To rename the current branch:
To push the local branch and reset the upstream branch:
To delete the remote branch:
Here are the steps to rename the branch:
git branch -m <new_name>
git push origin :<old_name>
git push origin <new_name>:refs/heads/<new_name>
Just three steps to replicate change in name on
remote
as well as on GitHub:Step 1
git branch -m old_branchname new_branchname
Step 2
git push origin :old_branchname new_branchname
Step 3
git push --set-upstream origin new_branchname
To rename your current branch to a new branch name
To re-name another branch