git-config

How to configure “git pull --ff-only” and “git merge --no-ff”

不想你离开。 提交于 2019-12-03 15:16:09
问题 A typical git workflow for me is to clone a remote repository and use git pull to keep it up-to-date. I don't want merge commits when I pull, so i use the --ff-only option. I also make local branches for feature work. I want to preserve the branch history, so when I merge the local branch back to my local clone, I use the --no-ff option. How can I configure git to use those options by default? Currently my .gitconfig looks like this: [merge] ff = false [pull] ff = only However, git pull

Git warning: unable to access 'P:\/.gitconfig': Invalid argument

我是研究僧i 提交于 2019-12-03 14:34:01
问题 I am just testing git. I ran the following command: git config user.email "test@mail.com" I now get this when git status and others: C:\gitg\g1>git status warning: unable to access 'P:\/.gitconfig': Invalid argument warning: unable to access 'P:\/.gitconfig': Invalid argument warning: unable to access 'P:\/.gitconfig': Invalid argument # On branch master warning: unable to access 'P:\/.gitconfig': Invalid argument nothing to commit, working directory clean C:\gitg\g1> 回答1: I just encountered

fatal: No existing author found with 'XXX'

你说的曾经没有我的故事 提交于 2019-12-03 08:58:19
问题 I used git for the first time and I set my user name and user mail. The commands I used are below: git config --global user.email "bob@example.com" git config user.email "bob@example.com" git config --global user.name "bob" git config user.name "bob" When I run git commit --author "bob" , I got an error fatal: No existing author found with 'bob' . How can I set user name and email? 回答1: You should stop using --author each time you commit, and instead configure an author with git config . Once

Using meld as difftool for git but listing all files in one window

假装没事ソ 提交于 2019-12-03 07:39:17
I want to use meld as my diff tool for git. If I configure my .gitconfig like this : [difftool] prompt = false [diff] tool = meld and run command : $ git difftool then git open a meld window for each file which have changes. But I want one single window with all my files in the meld list box. I have read a little about -d or --dir-diff option. When I try : $ git difftool -d then a single windows is opened with one directory tree in each meld part, but either contain empty directories. I can not open my files from here. For infomation : $ git --version git version 1.9.1 $ meld --version meld 1

“git init” failed, what's wrong?

为君一笑 提交于 2019-12-03 06:15:42
This issue is not same as " Bad git config file .git/config ", since it failed when using git init . It seems there is nothing wrong with /home/mirror/.gitconfig: [mirror@home php]$ git init error: Malformed value for push.default: simple error: Must be one of nothing, matching, tracking or current. fatal: bad config file line 8 in /home/mirror/.gitconfig This is the content of ~/.gitignore: cat ~/.gitconfig [alias] lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative [user] email = xxxxxx@gmail.com

How to configure “git pull --ff-only” and “git merge --no-ff”

天涯浪子 提交于 2019-12-03 05:57:44
A typical git workflow for me is to clone a remote repository and use git pull to keep it up-to-date. I don't want merge commits when I pull, so i use the --ff-only option. I also make local branches for feature work. I want to preserve the branch history, so when I merge the local branch back to my local clone, I use the --no-ff option. How can I configure git to use those options by default? Currently my .gitconfig looks like this: [merge] ff = false [pull] ff = only However, git pull (which is really git fetch and git merge) seems to be picking up the merge option and therefore creating

How to make Git “add --all” by default?

半城伤御伤魂 提交于 2019-12-03 05:52:28
I just ran into this message: $ git add . warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with respect to paths you removed. Paths like 'README.md' that are removed from your working tree are ignored with this version of Git. * 'git add --ignore-removal <pathspec>', which is the current default, ignores paths you removed from your working tree. * 'git add --all <pathspec>' will let you also record the removals. Run 'git status' to check the paths you removed from your working tree. I think setting --all is a pretty sane default

Unable to auto-detect email address

末鹿安然 提交于 2019-12-03 04:41:12
问题 I'm new to SmartGit. I can't commit through my repository, the message I'm receiving is: Unable to auto-detect email address (got 'Arreane@Arreane-PC.(none)') *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository I'm using a different PC, but if I commit at home it commits and pushes perfectly, I don't know if this was the

Git warning: unable to access 'P:\\/.gitconfig': Invalid argument

假装没事ソ 提交于 2019-12-03 04:19:49
I am just testing git. I ran the following command: git config user.email "test@mail.com" I now get this when git status and others: C:\gitg\g1>git status warning: unable to access 'P:\/.gitconfig': Invalid argument warning: unable to access 'P:\/.gitconfig': Invalid argument warning: unable to access 'P:\/.gitconfig': Invalid argument # On branch master warning: unable to access 'P:\/.gitconfig': Invalid argument nothing to commit, working directory clean C:\gitg\g1> I just encountered this error. Executing set HOMEPATH in the command line gave this output: HOMEPATH=\ Simply deleting this

fatal: No existing author found with 'XXX'

心已入冬 提交于 2019-12-02 21:41:52
I used git for the first time and I set my user name and user mail. The commands I used are below: git config --global user.email "bob@example.com" git config user.email "bob@example.com" git config --global user.name "bob" git config user.name "bob" When I run git commit --author "bob" , I got an error fatal: No existing author found with 'bob' . How can I set user name and email? meagar You should stop using --author each time you commit, and instead configure an author with git config . Once you've done so, you can type git commit and the author will be pulled from your .gitconfig file. If