Mac os git editor

Setting core.editor for Git on Mac OSX

After setting Atom as my core editor for Git, when I then commit in Terminal I receive the error:

/usr/local/bin/atom -n -w: /usr/local/bin/atom: No such file or directory error: There was a problem with the editor ‘/usr/local/bin/atom -n -w’. Please supply the message using either -m or -F option.

From the error it seems that Atom.app isn’t saved in the place that Git is looking. So I have type what I believe is the full path name:

After this I still receive the exact same error message.

(I am new to Mac and Git, though I got all of this setup no problems on my Linux system)

1 Answer 1

I tried using Atom as the editor for commit messages and had no issues. The only thing I might have done differently is installing Atom using brew cask instead of manually downloading and installing:

  1. brew cask install atom (this installed v. 1.9.9 of atom)
  2. which atom to confirm that it is present in the path at /usr/local/bin/atom

  1. git config —global core.editor «/usr/local/bin/atom -n -w» to configure atom as the default git text editor.
  2. Tried a test commit which opens up atom to allow typing the commit message and waits for it to exit (thanks to the -w option above).

Looking at the atom in path, it is actually a symlink:

Источник

Associating text editors with Git

Use a text editor to open and edit your files with Git.

Using Atom as your editor

  1. Install Atom. For more information, see «Installing Atom» in the Atom documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Using Visual Studio Code as your editor

  1. Install Visual Studio Code (VS Code). For more information, see «Setting up Visual Studio Code» in the VS Code documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:
Читайте также:  Windows те kernel size

Using Sublime Text as your editor

  1. Install Sublime Text. For more information, see «Installation» in the Sublime Text documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Using TextMate as your editor

  1. Install TextMate.
  2. Install TextMate’s mate shell utility. For more information, see «mate and rmate» in the TextMate documentation.
  3. Open Terminal Terminal Git Bash .
  4. Type this command:

Using Atom as your editor

  1. Install Atom. For more information, see «Installing Atom» in the Atom documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Using Visual Studio Code as your editor

  1. Install Visual Studio Code (VS Code). For more information, see «Setting up Visual Studio Code» in the VS Code documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Using Sublime Text as your editor

  1. Install Sublime Text. For more information, see «Installation» in the Sublime Text documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Using Notepad++ as your editor

  1. Install Notepad++ from https://notepad-plus-plus.org/. For more information, see «Getting started» in the Notepad++ documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Using Atom as your editor

  1. Install Atom. For more information, see «Installing Atom» in the Atom documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Using Visual Studio Code as your editor

  1. Install Visual Studio Code (VS Code). For more information, see «Setting up Visual Studio Code» in the VS Code documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Using Sublime Text as your editor

  1. Install Sublime Text. For more information, see «Installation» in the Sublime Text documentation.
  2. Open Terminal Terminal Git Bash .
  3. Type this command:

Help us make these docs great!

All GitHub docs are open source. See something that’s wrong or unclear? Submit a pull request.

Источник

Set Visual Studio Code to be global Git editor on OSX

I want to set VS Code to be my default git editor for commands such as rebase. This doesn’t seem to be documented on the VS Code website. I’ve found a SO question about doing it for Windows, which sounds like it has mixed success: How to use Visual Studio Code as Default Editor for Git

Has anyone managed this on OSX?

4 Answers 4

This work for me.

Install «code» from VSCode commander (Shift + Command + P)

Shell Command: Install ‘code’ command in ‘PATH’

Install it.

Читайте также:  Amlogic aml8726 mx linux

after that… run commands on terminal for config git with new editor:

Install «code» from VSCode commander(Shift + Command + P)

then use these 2 lines in your terminal,

if you want to see local git config,

This is currently not possible with VS Code but planned for the future.

Update for our VS Code 1.0 release:

This is now possible! All you need to do is to configure Code as the git editor using the newly introduced —wait option from the command line.

Under OS X El Capitan (10.11.4) I was able to setup the whole thing:

  1. Install Visual Code Studio on you OS X (make sure it’s inside Applications folder /Applications )
  2. Create a link with name vscode that links to your Visual Studio (inside Applications folder)using below command (be sure to use correct paths).

/bin folder doesn’t exists, just create it:

/bin exists just create a link:

ln -s /Applications/Visual\Studio\Code.app/Contents/Resources/app/bin/code

  1. Restart your terminal/shell and you should be able to open Visual Studio Code by typing vscode in terminal window.
  1. Visual Studio should open. If not and you have error. Add

/bin/ to your PATH under OS X. Follows this (How do I add

/bin to my path?)
Edit global git config file with

/.gitconfig and set editor using code name. In my case it looks like this:

git config —global core.editor «vscode —wait»

  1. Save file & restart terminal window. That’s it!. Now you should be able enter commits descriptions using Visual Studio Code!

Источник

GUI Clients

Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience.

If you want to add another GUI tool to this list, just follow the instructions.

GitHub Desktop

Platforms: Mac, Windows Price: Free License: MIT

SourceTree

Platforms: Mac, Windows Price: Free License: Proprietary

TortoiseGit

Platforms: Windows Price: Free License: GNU GPL

Git Extensions

Platforms: Linux, Mac, Windows Price: Free License: GNU GPL

GitKraken

Platforms: Linux, Mac, Windows Price: Free / $29 / $49 License: Proprietary

Magit

Platforms: Linux, Mac, Windows Price: Free License: GNU GPL

SmartGit

Platforms: Linux, Mac, Windows Price: $79/user / Free for non-commercial use License: Proprietary

Tower

Platforms: Mac, Windows Price: $69/user (Free 30 day trial) License: Proprietary

Читайте также:  Нет иконки мой компьютер windows 10

MeGit (based on EGit)

Platforms: Linux, Mac, Windows Price: Free License: EPL2.0

Sublime Merge

Platforms: Linux, Mac, Windows Price: $99/user, $75 annual business sub, free eval License: Proprietary

GitUp

Platforms: Mac Price: Free License: GNU GPL

Platforms: Mac, Windows Price: $49.99, free evaluation License: Proprietary

GitAhead

Platforms: Linux, Mac, Windows Price: Free License: MIT

Platforms: Linux, Windows Price: Free License: GNU GPL

ungit

Platforms: Linux, Mac, Windows Price: Free License: MIT

Fugitive

Platforms: Linux, Mac, Windows Price: Free License: Vim

GitEye

Platforms: Linux, Mac, Windows Price: Free License: Proprietary

LazyGit

Platforms: Linux, Mac, Windows Price: Free License: MIT

gmaster

Platforms: Windows Price: Beta / Free for non-commercial use License: Proprietary

Guitar

Platforms: Linux, Mac, Windows Price: Free License: GNU GPL

Pocket Git

Platforms: Android Price: 1.99€ License: Proprietary

Working Copy

Platforms: iOS Price: Free with in-app purchases License: Proprietary

Gitfox

Platforms: Mac Price: €3.99/m or €24,99/y per user License: Proprietary

git-cola

Platforms: Linux, Mac, Windows Price: Free License: GNU GPL

Cycligent Git Tool

Platforms: Linux, Mac, Windows Price: Free License: Proprietary

GitUI

Platforms: Linux, Mac, Windows Price: Free, but donations welcome License: MIT

giggle

Platforms: Linux Price: Free License: GNU GPL

Aurees

Platforms: Linux, Mac, Windows Price: Free License: Proprietary

Gitbox

Platforms: Mac Price: $14.99 License: Proprietary

CodeReview

Platforms: Linux, Mac, Windows Price: Free License: GNU GPL

Git2Go

Platforms: iOS Price: Free with in-app purchases License: Proprietary

SnailGit

Platforms: Mac Price: $9.99 / Lite version License: Proprietary

GitX-dev

Platforms: Mac Price: Free License: GNU GPL

GitBlade

Platforms: Linux, Mac, Windows Price: Free Lite version, $59.99/user/year for PRO version License: Proprietary

RepoZ

Platforms: Mac, Windows Price: Free License: MIT

Platforms: Windows Price: Free License: Proprietary

GitDrive

Platforms: iOS Price: Free with in-app purchases License: Proprietary

GitFiend

Platforms: Linux, Mac, Windows Price: Free License: Proprietary

GitAtomic

Platforms: Windows Price: 15.00€ License: Proprietary

NitroGit

Platforms: Windows Price: 20€/user / Free for non-commercial use License: Proprietary

GitFinder

Platforms: Mac Price: $24.95 License: Proprietary

Vershd

Platforms: Linux, Mac, Windows Price: Free for personal use, otherwise $37 License: Proprietary

GitVine

Platforms: Linux, Mac, Windows Price: Free License: Proprietary

PolyGit

Platforms: iOS Price: Free with in-app purchases License: Proprietary

There are other great GUI tools available as well. Have a look at the list of interfaces, frontends and tools in the Git Wiki.

Источник

Оцените статью