git-config

how do I emulate read and update git global config file using gitPython?

天涯浪子 提交于 2020-06-02 17:08:20
问题 I want to reads git global config file using git config --list , so I can use to read and update the global config file ? 回答1: This will give you the ~/.gitconfig type config: globalconfig = git.GitConfigParser([os.path.normpath(os.path.expanduser("~/.gitconfig"))], read_only=True) That's more or less what gitpython itself does, except it also uses "system" and "repo" level configs (where system is "/etc/gitconfig"), see def _get_config_path(self, config_level): and def config_reader(self,

GitConfig: bad config for shell command

☆樱花仙子☆ 提交于 2020-01-24 09:23:54
问题 I'm trying to set up an alias, as I have many. For some reason, this one does not work. Any idea? [alias] t = "!git log --decorate --oneline | egrep '^[0-9a-f]+ \(tag: ' | sed -r 's/^.+tag: ([^ ]+)[,\)].+$/\1/g'" Command works fine by itself: $ git log --decorate --oneline | egrep '^[0-9a-f]+ \(tag: ' | sed -r 's/^.+tag: ([^ ]+)[,\)].+$/\1/g' 1.0.0 0.9.0 ... $ git t fatal: bad config file line 28 in /Users/alanschneider/.gitconfig 回答1: Backslash (" \ ") characters are read by git itself in

Using Notepad++ as Git Editor without affecting settings

久未见 提交于 2020-01-10 18:24:31
问题 I use and love Notepad++ (http://notepad-plus-plus.org/) as my go to simple text editor. I have been using it as my default editor for git for a few weeks now and have noticed some funny behavior. Normally I run Notepad++ with the Tab Bar enabled like so However when I use Notepad++ as my git editor I would prefer it to open in the most basic mode possible (mainly no tabs, and in its own instance) I simply want a text editor to log my commit messages and such. The relevant section of my

Why does my Git mergetool configuration not work?

不羁岁月 提交于 2020-01-04 06:58:14
问题 I want to set trustExitCode to false and keepTemporaries to true but it does not work... I don't underestand why. Here is my ~/.gitconfig : [merge] conflictstyle = diff3 tool = p4merge [mergetool] keepTemporaries = true keepBackup = true trustExitCode = false [mergetool "p4merge"] trustExitCode = false keepTemporaries = true [mergetool "mymeld"] cmd = meld --diff $BASE $LOCAL --diff $BASE $REMOTE --diff $LOCAL $MERGED $REMOTE trustExitCode = false keepTemporaries = true [mergetool "myp4merge"