accidentally typed in the console wrong and now I can not delete the wrongly named branch:
git branch develop * master origin/admin-news how do i delete the last thread (origin / admin-news)
accidentally typed in the console wrong and now I can not delete the wrongly named branch:
git branch develop * master origin/admin-news how do i delete the last thread (origin / admin-news)
the same branch command, but with the -d option
create:
$ git branch origin/admin-news $ git branch * master origin/admin-news and delete:
$ git branch -d origin/admin-news Deleted branch origin/admin-news (was 1ba85e8). $ git branch * master if in response to the git branch -d ... command git branch -d ... you will receive a message of the form:
error: The branch 'origin / admin-news' is not fully merged.
'Git branch -D origin / admin-news'.
and you are sure that you do not need unique commits in the deleted branch, then replace, as suggested in the message, the -d option with -D :
$ git branch -D origin/admin-news Deleted branch origin/admin-news (was a6f907d). -d and -D , but for the sake of brevity I decided not to paint so much. I shall add. - aleksandr barakinSource: https://ru.stackoverflow.com/questions/538274/
All Articles
origin\/admin-news) - KoVadimorigin/admin-news, git will decide that this is a remote branch, and it is local. But git was surprised once again. But in general, it is strange, usually in the name of a branch you cannot use characters that cannot be used in the file name. Looked deeper. git created a folder in the.git/refs/heads/directory ... original. - KoVadim