相关疑难解决方法(0)

如何在本地和远程删除Git分支?

我想删除本地和我在GitHub上的远程项目分支上的分支.

尝试删除远程分支失败

$ git branch -d remotes/origin/bugfix
error: branch 'remotes/origin/bugfix' not found.

$ git branch -d origin/bugfix
error: branch 'origin/bugfix' not found.

$ git branch -rd origin/bugfix
Deleted remote branch origin/bugfix (was 2a14ef7).

$ git push
Everything up-to-date

$ git pull
From github.com:gituser/gitproject
* [new branch] bugfix -> origin/bugfix
Already up-to-date.
Run Code Online (Sandbox Code Playgroud)

remotes/origin/bugfix在本地和GitHub上成功删除分支我需要做些什么 ?

git version-control git-push git-remote git-branch

2万
推荐指数
42
解决办法
784万
查看次数

如何在不按Enter的情况下获得单个角色?

如何在不按Enter键的情况下从终端获取单个键盘字符?我试过了Curses::getch,但这对我没用.

ruby getch

39
推荐指数
5
解决办法
2万
查看次数

Ruby STDIN.getc在接收时不读取char

似乎Ruby IO#getc在返回字符之前等到接收到\n.

如果您尝试运行此脚本:

STDOUT.sync = true
STDIN.sync = true
while data = STDIN.getc
  STDOUT.puts "Char arrived"
end
Run Code Online (Sandbox Code Playgroud)

每个发送到stdin的char都会返回一个"Char arrival",但只有在发送了\n之后才会返回.

即使我写STDIN.sync = true,似乎所有char都被缓冲.

在将字符发送到STDIN之后,有没有人知道如何使脚本打印"Char到达"?

ruby stdin getc

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

标签 统计

ruby ×2

getc ×1

getch ×1

git ×1

git-branch ×1

git-push ×1

git-remote ×1

stdin ×1

version-control ×1