override git config –system in .gitconfig user file ( git config –global )

I have that file in a system wide configuration (but it can also be included with git config include.path=”/path/to/defaultconfig” I would like to reset some values previously setted. In particular, the default config file contains diff.external = git-diff-wrapper, and I would like to deactivate it for some user

What does GitHub for Windows' “sync” do?

With GitHub for Windows, you can “publish” a branch, and then “sync” that branch to GitHub. Is the sync basically a git pull and git push? Or is there more to it? If I wanted to do the exact same steps as “sync” from the command line, what should I do? (It’s not Open Source, […]

.gitignore files added inside Git submodules

I recently reorganized my dotfiles to live inside a Git repository at ~/Dropbox/dotfiles and I’m using pathogen to bundle all Vim addons inside ~/Dropbox/dotfiles/home/.vim/bundle. These addons were added as Git submodules. Now the problem is, when I run Vim, it automatically generates the documentation for all addons and puts them inside each submodule directory. This […]

Why am I getting the message, “fatal: This operation must be run in a work tree?”

Just installed git on Windows. I set the GIT_DIR variable to be c:\git\ and verified that this environment variable is maintained by cygwin (i.e. echo $GIT_DIR is what it should be). I went to the folder that I wanted to create the git repository for, let’s say c:\www, and then ran: git init git add […]

How do I keep an svn:external up to date using git-svn?

Treating my repository as a SVN repo, I get: svn co http://myrepo/foo/trunk foo … foo/ bar/ baz/ -> http://myrepo/baz/trunk Treating it as a Git repo, I get: git svn clone http://myrepo/foo –trunk=trunk –branches=branches –tags=tags … foo/ bar/ I can clone baz to my local machine elsewhere and add a symlink, but that’s just a hack. […]

How does 'git merge' work in details?

I want to know an exact algorithm (or near that) behind ‘git merge‘. The answers at least to these sub-questions will be helpful: How does git detect the context of a particular non-conflicting change? How does git find out that there is a conflict in these exact lines? Which things does git auto-merge? How does […]

Git checkout and merge without touching working tree

Say I have a feature branch, into which I merge upstream changes prior to pushing my changes back: git branch feature1 … [edit my code] … [commit] git fetch origin master git merge fetch_head [or rebase] … [resolve conflicts] … [build and test code] At this point I wish to push my changes. The normal […]

Setting up a git remote origin

I have the following repos. DEV REPO: in a directory on my development machine where i make changes MAIN REPO: bare repository on my development machine to which i push changes from dev repo PRODUCTION REPO: repository on host machine to pull updates from the main repo I used git remote add origin /Users/me/sites/main_repo to […]

Git is deleting an ignored file when i switch branches

I have one branch (let’s call it B) that ignores a certain file, which isn’t ignored in some other branches (eg branch A). When i switch from branch B to branch A, then back to B again, the file has been deleted. Is this normal? I can sort of see how it would happen, in […]

git find fat commit

Is it possible to get info about how much space is wasted by changes in every commit — so I can find commits which added big files or a lot of files. This is all to try to reduce git repo size (rebasing and maybe filtering commits)

Git Baby is a git and github fan, let's start git clone.