Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save the configuration after changing lines from a git config --edit

Tags:

git

allow me to explain my query here.

I'm trying to reset all authors including my git-pairs

git pair --reset isn't working anymore. A documentation had advised me to do the configuration using git config --edit

I entered the command git config --edit

and removed the

[user] and [git-pair] values...

How can I save the configuration after? Should I hit something from the keyboard or what.

I just know how to insert stuffs in there by pressing Insert button from keyboard but I dont know how to save the config and go back to the command prompt earlier.

I want to save the new config file which is:

[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
        hideDotFiles = dotGitOnly
~
like image 875
rukia_kuchiki_21 Avatar asked Jul 24 '12 07:07

rukia_kuchiki_21


People also ask

How do I save and exit git config file?

If you want to save your changes and quit, press Esc then type :wq and hit Enter or ↵ or on Macs, Return .

How do I change my git config file?

The global git config is simply a text file, so it can be edited with whatever text editor you choose. Open, edit global git config, save and close, and the changes will take effect the next time you issue a git command. It's that easy.


1 Answers

Assuming the editor in use is VI(M): hit esc to leave insert mode, then :wq to save and quit

like image 137
knittl Avatar answered Sep 20 '22 13:09

knittl