Sunday 15 July 2012

osx - Missing Git Configuration Dot files -



osx - Missing Git Configuration Dot files -

earlier in week decided seek , turn dot files git repo using symlink , broke lot of dev set up. while i've restored can, i'm still having few trailing issues i'm unsure how solve.

one illustration when run git commit (with no flags), pop vim typical items found in .gitmessage:

50-character subject line

72-character wrapped longer description. should answer:

why alter necessary? how address problem?

are there side effects?

include link ticket, if any.

i apparently got rid of file because when run git commit shows:

so got 1 of other developers here send me .gitmessage file, dropped directory when run git commit vim shows normal vim start screen. start type , save , complains not having filename. give 1 , doesn't seem care or attach git commit.

i'm sure screwed number of git issues i'm unsure or how prepare this.

edit:

thanks michael i've updated commit.template point right file alas i'm still not getting right. here's looks like:

a couple of configurations went missing , aren't hard restore. first commit.template git configuration. 1 time have restored ~/.gitmessage file intended location, tell git how find with:

git config --global commit.template $home/.gitmessage

or add together if don't mind modifying .gitconfig directly, can add:

[commit] template = ~/.gitmessage

then, based on animation above, appears git may using different editor settings vim expect to. may because core.editor configuration unset , relying on $editor environment variable. if want utilize proper vim (rather vi compatibility), set configuration:

git config --global core.editor vim

or modify .gitconfig

[core] editor = vim

this part might have been avoided if $editor environment variable set vim. recommend doing anyway, preferred editor used when running programme calls editor. in ~/.bashrc may add:

export editor=vim

osx git vim dotfiles

No comments:

Post a Comment