Tlaloc-ES
Tlaloc-ES

Reputation: 5282

ng is called instead of git when I use rebase or another flags

Hello I have a machine in my job, with angular-cli and git installed.

The problem is that when I try to do git rebase, or another "complex" git command, this returns the following:

The specified command ("/home/user/project/.git/COMMIT_EDITMSG") is invalid. For a list of available options, run "ng help".

Did you mean "make-this-awesome"?

I try to solve this, uninstalling npm, and ng, but doesn't work.

The $PATH is the following:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/user/Android/Sdk/platform-tools:/home/user/Android/Sdk/tools

but when I use gitkraken for example this error doesn't happen

Any idea that how to solve it?

Upvotes: 2

Views: 660

Answers (2)

Don't panic
Don't panic

Reputation: 303

I had a similar problem with a ng error when trying to use visudo.

It turns out that visudo (and I guess possibly git) uses the editor defined by the link /usr/bin/editor, which in my config points to another link /etc/alternatives/editor, which somehow ended up defined as /usr/bin/ng...

Resetting that last link to an actual editor (here vim) solved the problem for me :

sudo ln -sf /usr/bin/vim /etc/alternatives/editor

Upvotes: 3

Tlaloc-ES
Tlaloc-ES

Reputation: 5282

Finally work updating the editor with nano, git config --global core.editor 'nano'

Upvotes: 0

Related Questions