Short answer: .git/config in your active git repository; ~/.gitconfig or ~/.config/git; /etc/gitconfig More detailed answer can be found in the git man page:
Git
Various tips and tricks related to maintaining your code with the git version control system.
gitk key shortcut for next file and previous file
git clone gives warning: “remote HEAD refers to nonexistent ref, unable to checkout.”
This warning: “remote HEAD refers to nonexistent ref, unable to checkout.” happened to me today and since it was an odd enough warning (I’ve never seen it before in all my years of work with git) I thought it’s worth describing the situation here and how I solved it. I cloned a remote git repository […]
What files to add to my version control (git,svn,etc..) from my Visual Studio project?
I guess ultimately the question is what NOT to take into your code versioning system… This is the contents of my .gitignore file… there may be other things which need to be ignored but that’s what I use: Backup/ Debug/ Release/ bin/ obj/ _UpgradeReport_Files/ CodeAnalyst/ *.csproj* *.user *.suo *.ncb *.dll *.exe *.pdb ipch/ *.sdf *.opensdf […]
HowTo: Listing (changed/untracked) files in git
When working with git it may often be convenient to get a (pure) list of files to give to some other command (e.g. astyle). This may be implemented as a trigger on the server but that has its pros and cons. Listing the modified files and processing them locally is the safest way as this […]
How to create a brand new git tracking branch (from scratch)?
There’s tons of advice on the web on how to setup a new local branch that tracks and existing remote branch. But what I was looking to do is create a brand new branch (i.e. not yet present neither on hte server nor on your workstation) and have it be a tracking branch. After lots […]
Git remote branches: how to create, track, remove/delete
1. Here’s how to to create a remote branch in git:: git push origin origin:refs/heads/my_branch … or even simpler and more straightforward: git branch my_branch # create branch locally git push origin my_branch # push it to server 2. To push your changes to the remote branch: git push origin my_branch 3. To delete the […]
How to move a branch in git?
“Moving a branch” may mean two things: 1. Move the contents (the commits, the changes) associated with a branch name somewhere else in the repository. 2. Move the branch name (not the code changes!) to point to some other commit. Let’s examine the two possibilities in detail: 1. Move branch contents and name: This case […]