How to Configure Text Editor for git

Asked

Viewed 1,484 times

-2

I’m trying here to configure the git editor for the sublime but it is giving error, anyone knows how to perform this configuration in the correct way? was trying something like this git config --global core.editor "subl -w"

2 answers

1

git config --global core.editor "subl -n -w"

Source

Note: If sublime has not been added to your environment variables, you need to inform the full path to the app instead of just subl. Example:

git config --global core.editor "'C:/Program Files/Sublime Text 2/sublime_text.exe' -n -w"

  • this -n and -w knows what it’s for?

  • -n is for a new window/tab to open and the -w is for git to "wait" until you close the editor.

0

Sometimes you also need to enter the email and commit author name in addition to the above commands. See below:

git config --global user.email "[email protected]"

git config --global user.name "seu nome"

Then the sublime works normally.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.