【发布时间】:2017-07-10 09:46:17
【问题描述】:
我使用的是 Windows 10,并且在 Git Immersion 教程的 Lab 5 中,使用 Git Bash 作为我的 shell。
我使用echo 'puts "Hello, World"' > hello.rb 来创建 hello.rb 文件,如下所示:
how to create a file with the cmd?
我是change our hello program to take an argument from the command line. Change the file to be:
puts "Hello, #{ARGV.first}!"
我曾想过使用 Sublime Text 来编辑文件,但我觉得不得不使用 Git Bash。如何在 Git Bash 中编辑文件?
谢谢!
【问题讨论】:
-
为什么你觉得有必要使用 Git Bash?在我看来,Sublime Text 是适合这项工作的工具。
-
@Haoyu:你想在不使用文本编辑器的情况下编辑文件????当你有心情惩罚自己时,有很多行之有效的方法....
-
@user1934428 是否可以在 Git Bash 中使用诸如 emacs 之类的文本编辑器进行编辑?我知道它适用于提交 cmets。
-
我从没想过人们可能想要使用文本编辑器以外的任何东西。我只是在徘徊:您之前是如何编辑程序的?为什么这与您使用的外壳有关?