Posts tagged git
Git delete local and remote branch
1First checkout a different branch than the one you want to delete, for example the master branch.
git checkout origin master
Solution 1
To delete your local and remote branch execute the following. “-r” stands for remote and “-d” for delete.
git branch -rd example
Solution 2
First delete the local branch:
git branch -d example
And after that also the remote branch:
git push origin :example
Git how to create remote branch from checked out master
0In a project you’ll reach at a certain point the need to start working on a new major version of your application, lets say version 2. Then you’ll probably want the current master to move to a branch with a name like “1.x” and from then on the master branch will contain version “2.x”.
To accomplish this, you’ll have to do some simple steps. I assume you already have a Git clone on your computer, go to the root directory of your clone and make sure you are in the master branch.
git branch -a
The branch with More >