Skip to content

Instantly share code, notes, and snippets.

@killmenot
Forked from isqua/git-editor.md
Created January 7, 2020 13:20
Show Gist options
  • Save killmenot/7d4217f21f32e3fe859c94a2e2cf7a9c to your computer and use it in GitHub Desktop.
Save killmenot/7d4217f21f32e3fe859c94a2e2cf7a9c to your computer and use it in GitHub Desktop.

Revisions

  1. @isqua isqua revised this gist Nov 21, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-editor.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -mul
    ## Mac OS X, TextEdit

    ```
    git config --global core.editor 'open -W -n'
    git config --global core.editor "open -W -n"
    ```

    ## Mac OS X, Atom
  2. @isqua isqua revised this gist Nov 21, 2016. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions git-editor.md
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,12 @@ git config --global core.editor "atom --new-window --foreground --wait"
    git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
    ```

    ## Mac OS X, TextEdit

    ```
    git config --global core.editor 'open -W -n'
    ```

    ## Mac OS X, Atom

    ```
  3. @isqua isqua revised this gist May 30, 2016. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions git-editor.md
    Original file line number Diff line number Diff line change
    @@ -41,5 +41,12 @@ git config --global core.editor "atom --wait"
    ## Mac OS X, Sublime Text 3

    ```
    ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl
    git config --global core.editor "subl -n -w"
    ```

    or

    ```
    git config --global core.editor '"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" -n -w'
    ```
  4. @isqua isqua revised this gist May 30, 2016. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions git-editor.md
    Original file line number Diff line number Diff line change
    @@ -30,4 +30,16 @@ git config --global core.editor "atom --new-window --foreground --wait"

    ```
    git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
    ```

    ## Mac OS X, Atom

    ```
    git config --global core.editor "atom --wait"
    ```

    ## Mac OS X, Sublime Text 3

    ```
    git config --global core.editor "subl -n -w"
    ```
  5. @isqua isqua revised this gist May 30, 2016. 1 changed file with 27 additions and 1 deletion.
    28 changes: 27 additions & 1 deletion git-editor.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,33 @@
    # Git editor
    # Set up git editor

    The main command is:

    ```
    git config --global core.editor "path to your editor with params"
    ```

    Set up an editor and check it by making a commit:

    ```
    git commit --allow-empty
    ```

    Your favourite editor should open. Write commit message, save and close file. See `git log` to look for a commit. Is it there? If yes, you’re awesome.

    ## Windows, Atom

    ```
    git config --global core.editor "atom --new-window --foreground --wait"
    ```

    ## Windows, Sublime Text 3

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

    ## Windows, Notepad++

    ```
    git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
    ```
  6. @isqua isqua revised this gist May 30, 2016. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion git-editor.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,7 @@
    # Git editor
    # Git editor

    ## Windows, Atom

    ```
    git config --global core.editor "atom --new-window --foreground --wait"
    ```
  7. @isqua isqua created this gist May 30, 2016.
    1 change: 1 addition & 0 deletions git-editor.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    # Git editor