Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
How do I make Git use the editor of my choice for commits?
Home
Education
How do I make Git use the editor of my choice for...
asked
Feb 2, 2022
in
Education
by
JackTerrance
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
git
vim
emacs
editor
commit-message
1
Answer
0
votes
answered
Feb 2, 2022
by
JackTerrance
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
Q: Explain How can we make Git use the editor of my choice for commits?
Explain How can we make Git use the editor of my choice for commits?...
asked
Jan 8, 2021
in
Technology
by
JackTerrance
interview-question-answer
technology-questions-answers
0
votes
Q: What is the Git command to view the last three commits in a line?
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
git
0
votes
Q: Delete commits from a branch in Git -Git delete commit
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
git
git-rebase
git-reset
0
votes
Q: Git discard changes-How do I discard unstaged changes in Git?
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
git
version-control
0
votes
Q: "git revert to previous commit": How do I revert a Git repository to a previous commit?
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
git
git-checkout
git-reset
git-revert
0
votes
Q: Git rename branch-How do I rename a local Git branch?
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
git
git-branch
remote-branch
0
votes
Q: Git stop tracking file-How to make Git “forget” about a file that was tracked but is now in .gitignore?
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
git
gitignore
git-rm
0
votes
Q: How can we make ignore file mode (chmod) changes in git?
How can we make ignore file mode (chmod) changes in git?...
asked
Jan 8, 2021
by
JackTerrance
git
0
votes
Q: How to copy text from Emacs to another application on Linux
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
emacs
0
votes
Q: What is the command to view all the commits made by a specific person (Jim)?
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
git
0
votes
Q: How to use Ansible git module pull a branch with local changes?
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
git
ansible
ansible-playbook
devops
0
votes
Q: Switching from Vim to Emacs - How to efficiently edit code
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
vim
0
votes
Q: How to replace a `\norm{ some string }` by `\| some string\|` quickly? [duplicate]
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
vim
0
votes
Q: How do you create a remote Git branch? -git create remote branch
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
git
branch
git-branch
0
votes
Q: git abort merge - I ran into a merge conflict. How can I abort the merge?
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
git
version-control
git-merge
merge-conflict-resolution
git-merge-conflict
...