git-config

How to save username and password in Git?

萝らか妹 提交于 2019-11-26 05:54:46
问题 I want to use a push and pull automatically in GitExtension , without entering my user and password in a prompt, every time. So how can I save my credentials in GIT ? 回答1: Run git config --global credential.helper store then git pull provide a username and password and those details will then be remembered later. The credentials are stored in a file on the disk, with the disk permissions of "just user readable/writable" but still in plaintext. If you want to change the password later git pull

How can I make Sublime Text the default editor for Git?

╄→гoц情女王★ 提交于 2019-11-26 03:24:53
问题 I have a problem setting Sublime Text 2 as the core.editor with git . I\'ve read through every post I could find addressing the problem, but still nothing is working for me. I am running Windows. I have done: git config --global core.editor \"\'C:/Program Files/Sublime Text 2/sublime_text.exe\'\" and tried that with various arguments like -m . When I open my .gitconfig , this is what is in there: [user] name = Spencer Moran email = smoran02@gmail.com [core] editor = \'C:/Program Files/Sublime

Can I specify multiple users for myself in .gitconfig?

若如初见. 提交于 2019-11-26 03:14:20
问题 In my ~/.gitconfig , I list my personal email address under [user] , since that\'s what I want to use for Github repos. But, I\'ve recently started using git for work, too. My company\'s git repo allows me to commit, but when it sends out announcements of new changesets, it says they are from Anonymous because it doesn\'t recognize the email address in my .gitconfig - at least, that\'s my theory. Is it possible to specify multiple [user] definitions in .gitconfig ? Or is there some other way

How can I make Sublime Text the default editor for Git?

巧了我就是萌 提交于 2019-11-26 02:34:55
I have a problem setting Sublime Text 2 as the core.editor with git . I've read through every post I could find addressing the problem, but still nothing is working for me. I am running Windows. I have done: git config --global core.editor "'C:/Program Files/Sublime Text 2/sublime_text.exe'" and tried that with various arguments like -m . When I open my .gitconfig , this is what is in there: [user] name = Spencer Moran email = smoran02@gmail.com [core] editor = 'C:/Program Files/Sublime Text 2/sublime_text.exe' If I go to Git and type: README.markdown --edit the README file opens in Notepad,

Difference between author and committer in Git?

笑着哭i 提交于 2019-11-26 00:36:20
问题 I am trying to make a commit like git commit --author=\"John Doe <john@doe.com>\" -m \"<the usual commit message>\" where John Doe is some user in whose name I want to make the commit. It appears all right in git log . However, when I do a gitk , the author name is correct, but the committer name is picked from my global git config settings (and is thus set to my name/email). Questions What is the difference between the two (committer vs author)? Should I be setting the committer as well to

How do I commit case-sensitive only filename changes in Git?

浪子不回头ぞ 提交于 2019-11-26 00:05:26
问题 I have changed a few files name by de-capitalize the first letter, as in Name.jpg to name.jpg . Git does not recognize this changes and I had to delete the files and upload them again. Is there a way that Git can be case-sensitive when checking for changes in file names? I have not made any changes to the file itself. 回答1: You can use git mv: git mv -f OldFileNameCase newfilenamecase 回答2: Git has a configuration setting that tells it whether to be case sensitive or insensitive: core

Is there a way to cache GitHub credentials for pushing commits?

↘锁芯ラ 提交于 2019-11-25 21:39:36
问题 I recently switched to synchronizing my repositories to https:// on GitHub (due to firewall issues), and it asks for a password every time. Is there a way to cache the credentials, instead of authenticating every time that git push ? 回答1: With Git version 1.7.9 and later Since Git 1.7.9 (released in late January 2012), there is a neat mechanism in Git to avoid having to type your password all the time for HTTP / HTTPS, called credential helpers. (Thanks to dazonic for pointing out this new

Where do the settings in my Git configuration come from?

社会主义新天地 提交于 2019-11-25 18:58:05
I've noticed that I have 2 listings for core.autocrlf when I run git config -l $ git config -l core.symlinks=false core.autocrlf=false color.diff=auto color.status=auto color.branch=auto color.interactive=true pack.packsizelimit=2g help.format=html http.sslcainfo=/bin/curl-ca-bundle.crt sendemail.smtpserver=/bin/msmtp.exe diff.astextplain.textconv=astextplain rebase.autosquash=true user.name=name user.email=email@example.com core.autocrlf=true Those last 3 (from user.name down) are the only ones in my c:\users\username\.gitconfig file. Where are all of the other ones coming from? Why is core