小编Alp*_*rot的帖子

即使在签出到另一个分支后也无法删除本地分支

我正在尝试删除我的本地分支并尝试了我在这里找到的大多数解决方案,即签出到另一个分支然后运行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 上运行

我尝试过的事情:

  1. 重新启动我的电脑
  2. 重新安装 Git Bash
  3. 结帐到另一个分支并git branch -d尝试git branch -D

错误截图: git分支删除错误 (virtualBDD) 是我的虚拟环境。你可以忽略这一点。

git branch git-bash

12
推荐指数
3
解决办法
2万
查看次数

Xcode - 按下按钮时终止带有NSException类型的未捕获异常

我是应用程序开发的新手,我正在学习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)

xcode button nsexception swift

3
推荐指数
1
解决办法
1852
查看次数

标签 统计

branch ×1

button ×1

git ×1

git-bash ×1

nsexception ×1

swift ×1

xcode ×1