Now I'm on the master branch, objectives is clean, there is no need to commit a:
$ git branch * master release $ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean
New Remote branch
Create a local branch:
$ git checkout -b dbg_lichen_star
Look at the current state branch:
$ git branch * dbg_lichen_star master release
An asterisk (*) indicates the current branch is located. The new branch is now the state is successfully created and has been switched to the new branch.
The local branch of the new push to a remote server, remote branch and the local branch of the same name (of course free to named):
$ git push origin dbg_lichen_star:dbg_lichen_star
Use git branch -a view all the branches, you will see the remotes / origin / dbg_lichen_star the remote branch, indicating the success of the new remote branch.
Delete remote branch
simple way I prefer, pushing an empty remote branch to branch, in fact, equivalent to delete remote branch:
$ git push origin :dbg_lichen_star
You can also use:
$ git push origin --delete dbg_lichen_star
Both approaches can delete the specified remote branch
---------------------
Author: -FIGHTING-
Source: CSDN
Original: https: //blog.csdn. net / u012701023 / article / details / 79222731
copyright: This article is a blogger original article, reproduced, please attach Bowen link!