in Education by
I would prefer to write my commit messages in Vim, but it is opening them in Emacs. How do I configure Git to always use Vim? Note that I want to do this globally, not just for a single project. Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
If you want to set the editor only for Git Set core.editor in git config: git config --global core.editor "vim" Set the git-editor environment variable to export GIT_EDITOR=vim If you need to set editor not only for git but also for other programs use following standardized visual and editor environmental variables export VISUAL=vim export EDITOR="$VISUAL" For sublime text: add the following to git.config file [core] editor = 'subl' --wait --wait is compulsory which allows you to type and will wait to save/close the event. For more information please go through the following tutorial to get more info about git:

Related questions

0 votes
    Explain How can we make Git use the editor of my choice for commits?...
asked Jan 8, 2021 in Technology by JackTerrance
0 votes
    What is the Git command to view the last three commits in a line? A. git last 3 commits B. git log -–oneline -3 C. git show log -3 D. git log...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    I would like to know how to delete a commit. By delete, I mean it is as if I didn't make that commit, ... -hard HEAD. Is this correct? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    How do I discard changes in my working copy that are not in the index? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    How do I revert from my current state to a snapshot made on a certain commit? If I do git log, then I get ... , i.e. commit 0d1d7fc? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I don't want to rename a remote branch, as described in the Rename master branch for both local and remote ... and remote branch name Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    There is a file that was being tracked by git, but now the file is on the .gitignore list. However, ... completely forget about it? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    How can we make ignore file mode (chmod) changes in git?...
asked Jan 8, 2021 by JackTerrance
0 votes
    When I cut (kill) text in Emacs 22.1.1 (in its own window on X, in KDE, on Kubuntu), ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    What is the command to view all the commits made by a specific person (Jim)? A. git log – who=”Jim” ... Jim” C. git log – “Jim” D. git log...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    My git workspace is dirty, there are some local modifications. When I use the command git pull origin master it ... Ansible git module? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    Currently I try to switch from vim to emacs and have some difficulty while editing code. For most of ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Find and replace strings in vim on multiple lines (11 answers) Vim ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I created a local branch that I want to 'push' upstream. There is a similar question here on Stack ... the upstream repository? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I used git pull and had a merge conflict: unmerged: _widget.html.erb You are in the middle of a conflicted merge. ... can I do this? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
...