Check out this screenshot...I just queried the branches and it shows that branch 'different-oil' is in the list of branches...then when I tried "del, rm, or checkout" the branch, it says the branch did not match...here's the screenshot:
What happened is that I deleted the branch from github once I merged the new master. Then in turn, I pulled the new master from github and merged. All is the same. How can I delete this branch that git is saying doesn't exist? I also relogged in:
Any Ideas...?
相关问题
- How to add working directory to deployment in GitH
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- java开发bug问题:GitHub授权登录无法获取授权账号信息?
- Is there a Github markdown language identifier for
- “no implicit conversion of Integer into String” er
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
Here's my answer...after reading another related post about deleting local branches, using the git branch -d, this command did let me know that on the local machine the merge was incomplete. This doesn't explain why it was telling me that the branch could not be found, but once I merged, then, as you can see below, the branch was deletable with the "git branch -d" command. Thanks to those who assisted.
As Thomas pointed out in the comments,
del
is not a valid bash command and also not a commad related togit
, which is the main error.To delete a local branch you can use
git branch -d different-oil
.To delete a remote branch you can use
git push origin --delete different-oil
orgit push origin :different_oil
.However, as you also tagged github, you can easily delete the branch in the webinterface.
Related question: How do I delete a Git branch both locally and remotely?
Further information: https://git-scm.com/book/en/v2/Git-Branching-Branch-Management
Basically you are running shell commands instead of git commands. You should prefix git-related commands with
git
. Take a look atgit --help
andgit branch --help
.To delete that branch you have to run
git branch -d different-oil
.