GitBash cmd行分支删除

时间:2017-03-30 02:33:02

标签: git-branch git-bash

我看到(feature/StoreTextVariable_134)是什么意思(我假设我之前创建的分支并在VS中切换,我之前删除了本地代码)?

我怎么能摆脱它?

enter image description here

我是GitBash的新手。

2 个答案:

答案 0 :(得分:1)

  

我看到的是什么(feature / StoreTextVariable_134)

feature / StoreTextVariable_134 是您当前正在处理的git的分支。

输入 git branch 以检查源代码中的分支数。

  

我怎么能摆脱它?

使用 git checkout 移至您需要使用的分支。

output

注意:如果当前分支上的源代码发生了变化,那么您需要在切换分支之前提交。

请在此处详细说明: Git document

答案 1 :(得分:1)

谢谢@Tai我必须在结帐时使用-f,以便我可以放弃我不需要的待处理更改

git checkout -f branchName

然后删除它我用

git branch -d -f branchName

现在我回到我的默认分支