Command to open file with git

后端 未结 18 1314
滥情空心
滥情空心 2021-01-30 04:05
  • I have sublime text as the default editor in git (and it works)
  • git config --edit opens the config file in sublime text (Awesome)
18条回答
  •  心在旅途
    2021-01-30 04:44

    You can use the following commands to open a file in git bash:

    vi                -- to open a file
    
    i                           -- to insert into the file 
    
    ESC button followed by :wq   -- to save and close the file 
    

    Hope it helps.

    Any other terminal based text editor, like vim, nano and many will also do the job just fine.

提交回复
热议问题