git-config

What settings affect user name in Git?

我怕爱的太早我们不能终老 提交于 2019-12-12 01:35:15
问题 I wanted to change the user name in my git configurations, but when I think I change the user name or email (in .gitconfig file) it restores back to the previous one. I have also tried doing it through git config --global user.name <user-name> but it "restores" back as well. Where else should I look? What are the (other) ways to tune my user name in Git? 回答1: git config user.name <user-name > takes precedence i believe, you can find the information in your repository $REPO_DIR/.git/config 来源:

Displaying git diff and git log output on a separate terminal screen

…衆ロ難τιáo~ 提交于 2019-12-11 03:09:14
问题 After setting up new development environment I encountered a strange git behavior that I don't recall seeing in the past. I am used to git diff and git log creating a new screen in the terminal and displaying their output inside (what less does by default, and I'm using it as my pager). I can then quit and go back to my previous terminal state, with the command output gone. Now, however, output is printed right into the same screen as if it was cat (but with a pager). Any ideas how to fix

Minor Git Issue - Changing Default Editor [duplicate]

不想你离开。 提交于 2019-12-11 02:18:51
问题 This question already has answers here : Closed 8 years ago . Possible Duplicates: How can I set up an editor to work with Git on Windows? Trouble on setting the git 'core.editor' I'm trying to change my default git text editor to TextMate, such that forgetting the -m tag on a commit will bring me into TextMate and not vi. I have [core] editor = mate -w in my ~/.gitconfig, but it still throws the following error at me: error: cannot run TextMate: No such file or directory error: There was a

Equivalent of branch.<name>.merge for git-push

陌路散爱 提交于 2019-12-11 02:07:57
问题 According to the git-config documentation for branch.<name>.merge : branch.<name>.merge Defines, together with branch.<name>.remote , the upstream branch for the given branch. It tells git fetch / git pull / git rebase which branch to merge and can also affect git push (see push.default ). Is there an equivalent setting to specify the upstream branch to push to, for the given branch? This is the behaviour I want to achieve - say I have a branch A with remote set to origin . On running git

how to implicitly `git push` from a local branch “X” to “origin/Y”

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 20:47:50
问题 Say you have a branch on your origin that has a ridiculously long name... $> git branch -a * master origin/master origin/branch-with-a-ridiculously-long-name And when you work on that branch locally, you want to give it a less ridiculous name, like bob . $> git checkout origin/branch-with-a-ridiculously-long-name $> git checkout -b bob $> git branch --set-upstream bob origin/branch-with-a-ridiculously-long-name When it comes time to push, what can you do such that if you run: $> git checkout

Git: Default “no commit” merge behaviour for all branches?

会有一股神秘感。 提交于 2019-12-10 13:17:19
问题 I want "git merge" to not commit by default (i.e., I want the "--no-commit" behaviour by default), regardless of the destination branch. I know of "git config branch.master.mergeoptions" for a particular branch, and I know of "git config merge.noff no" for disabling fast-forward on all branches by default. None of the following experiments work for me. Should they? git config branch.mergeoptions --no-commit git config branch.*.mergeoptions --no-commit git config merge.commit no Can't seem to

Using same git repository by multiple users

谁说胖子不能爱 提交于 2019-12-10 10:37:10
问题 As far as I know, only a single user's identity may be specified with git config. I have a situation where I'd like to have multiple identities for the same git repository, depending on the UNIX user. The repository is at /var/www. When user jack makes a commit to it, the commit should automatically be jack's identity. When user jill makes a commit, jill's identity should be used. The reason why I want to use the same repository is because it's the content of a website, and Apache is looking

How share a config file in git?

怎甘沉沦 提交于 2019-12-10 01:45:02
问题 I have editor settings that I want to spread in all repositories. If the user defines its own settings, it should erase the repository choices of course. I want to do that because I have a class and every student clone the repo. Usually they forget to set the core.editor setting and ends up messing around with vi, usually crashing the repo just like if they have cursed magical power. As it worked for my HOME dir, I tried to use a .gitconfig in my repo dir, like I would set a .gitignore, but

How do I include --no-pager in a Git alias?

旧城冷巷雨未停 提交于 2019-12-10 01:44:46
问题 I created a Git alias based off of the Git Immersion tutorial by EdgeCase that looks like this: hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short But now it seems to be paging the results — Terminal shows (END) after the results are displayed, forcing me to hit Q to continue working. I read that by adding in the --no-pager tag, you can disable this feature; how do I incorporate it into the alias? I've tried it at the end, before the log , and right after, and none of

fatal: bad config value for 'receive.denycurrentbranch' in ./config

断了今生、忘了曾经 提交于 2019-12-08 01:32:25
问题 I use git to push commited changes to a repo that lies on a server. Now there is this Error: $ git push -u origin master fatal: bad config value for 'receive.denycurrentbranch' in ./config fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. What it looks like in the console Window Now I suppose that this error might be due to some failures in the SSH connection. I use PuTTY to connect via SSH to my webserver. However, I