Command to open file with git

后端 未结 18 1626
滥情空心
滥情空心 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

    while you are working in some whatever project and you want to make a minor change you can use git default editor, however you'd probably need a little script that parse the file generated by command below

    git config -l
    

    then the variable code.editor holds the value /Applications/Sublime_Text.app -n -w

    which you can open using os.system()

提交回复
热议问题