我正在尝试删除我的本地分支并尝试了我在这里找到的大多数解决方案,即签出到另一个分支然后运行git branch -D (or -d) <my_branch>。我尝试过,但仍然收到相同的错误,指出“无法删除在“my_path”签出的分支“my_branch”
我是如何陷入这种情况的:我通过执行git worktree add -b branch_name ../project_name develop. 然后我意识到我想更改我的分支名称,因此我首先使用 删除了整个目录rm- rf。现在 my_path 指向已删除的目录,所以我不知道现在该怎么办。帮助将不胜感激。我使用 Git Bash 在 Windows 7 上运行
我尝试过的事情:
git branch -d尝试git branch -D错误截图:
(virtualBDD) 是我的虚拟环境。你可以忽略这一点。
我是应用程序开发的新手,我正在学习Apple的教程.我已经查看了很多关于这类错误的问题,但没有一个问题对我有所帮助.在教程中,我坚持使用"向视图添加按钮"部分,当我点击/单击按钮时,我正在尝试实现在控制台上打印的字符串.这样做时我才会收到错误.
我在Swift中的按钮代码:
import UIKit
class StarRatingControl: UIView {
// MARK: Initialization
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
let button = UIButton(frame: CGRect(x: 0, y: 0, width: 44, height: 44))
button.backgroundColor = UIColor.cyanColor()
button.addTarget(self, action: "ratingButtonTapped", forControlEvents: .TouchDown)
addSubview(button)
}
override func intrinsicContentSize() -> CGSize {
return CGSize(width: 240, height: 44)
}
// MARK: Button Action
func ratingButtonTapped(button: UIButton) {
print("Button pressed!")
}
}
Run Code Online (Sandbox Code Playgroud)
错误:
2015-09-16 12:43:17.409 FoodTracker[954:13341] -[FoodTracker.StarRatingControl ratingButtonTapped]: unrecognized selector sent to instance 0x7f939b7a43b0 …Run Code Online (Sandbox Code Playgroud)