1

I followed few articles over the pretty attributes on Git 2.10 release note. Going through which upgraded the git to 2.10.0 and made changes to global .gitconfig resulting as follows -

[filter "lfs"]
    clean = git-lfs clean %f
    smudge = git-lfs smudge %f
    required = true
[user]
    name = xyz
    email = abc.def@gmail.com
    signingkey = AAAAAAA
[core]
    excludesfile = /Users/xyz/.gitignore_global
    editor = 'subl' --wait   <!--this is where its failing I guess--!>
[difftool "sourcetree"]
    cmd = opendiff \"$LOCAL\" \"$REMOTE\"
    path = 
[mergetool "sourcetree"]
    cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
    trustExitCode = true
[alias]
    lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
[color "diff"]
    old = red strike
    new = green italic

But now when I try and execute git commands as follows, I get no progress details on the console or proper message display.

➜  automation git:(branch1) git pull origin master
From https://github.com/XYZ/automation
 * branch            master     -> FETCH_HEAD
Auto-merging pom.xml
Auto-merging test/pom.xml
'subl' --wait: subl: command not found
error: There was a problem with the editor ''subl' --wait'.
Not committing merge; use 'git commit' to complete the merge.

Update : Post the comment from @Arvin for duplicacy

If I follow the solution there to change my default git editor using

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

I still get

subl -n -w: subl: command not found error: There was a problem with the editor 'subl -n -w'.

Naman
  • 27,789
  • 26
  • 218
  • 353
  • Possible duplicate of [How can I make Sublime Text the default editor for Git?](http://stackoverflow.com/questions/8951275/how-can-i-make-sublime-text-the-default-editor-for-git) – Arvin Sep 16 '16 at 06:59
  • @Arvin - i've explained why its not a duplicate – Naman Sep 19 '16 at 04:32

1 Answers1

0

This post should help - How can I make Sublime Text the default editor for Git?

Below is what it states -

Sublime Text 2 (Build 2181)

The latest build 2181 just added support for the -w (wait) command line argument. The following configuration will allow ST2 to work as your default git editor on Windows. This will allow git to open ST2 for commit messages and such.

git config --global core.editor "'c:/program files/sublime text 2/sublime_text.exe' -w"

Sublime Text 3 (Build 3065)

Sublime Text 3 (Build 3065) added the subl.exe command line helper. Use subl.exe -h for the options available to you. I have hot_exit: true and remember_open_files: true set in my Sublime Text user settings. I have found the following to git config to work well for me.

git config --global core.editor "'c:/program files/sublime text 3/subl.exe' -w"

With this git config the a new tab is opened in my editor. I edit my commit message, save the tab and close it (CTRL+w). Git will wait until the tab is closed to continue its work.

Community
  • 1
  • 1
Arvin
  • 1,232
  • 9
  • 8
  • have updated the question and the tag(osx) after your comment. This also doesn't seem to be solving the problem. – Naman Sep 18 '16 at 10:14