How to update git version from GitHub Desktop on Windows

I want to use the new worktree functionality introduced in git 2.5. However, I don’t know how to update to the most recent version of GitHub Desktop (not git itself). I install GitHub for desktop and hoped it ships with the most recent version, however git –version returns git version 1.9.5.github.0. But if I understand […]

How can I uncommit the last commit in a git bare repository?

Taking into consideration that there are several git commands that make no sense in a bare repository (because bare repositories don’t use indexes and do not have a working directory), git reset –hard HEAD^ is not a solution to uncommit the last change in such a repository. Searching through the Internet, all I could find […]

Pushing to github after a shallow clone

I had a massive git repo because of a huge number of commits, so following advice here I created a shallow clone. I’ve made changes to this new local repo, and now I want to push to my origin at Github (and then on to my staging and production remotes on Heroku). Perhaps one day […]

Rebasing a Git merge commit

Take the following case: I have some work in a topic branch and now I’m ready to merge back to master: * eb3b733 3 [master] [origin/master] | * b62cae6 2 [topic] |/ * 38abeae 1 I perform the merge from master, resolve the conflicts and now I have: * 8101fe3 Merge branch ‘topic’ [master] |\ […]

List all the files that ever existed in a Git repository

Do you have a clean way to list all the files that ever existed in specified branch?

How to “git show” a merge commit with combined diff output even when every changed file agrees with one of the parents?

After doing a “simple” merge (one without conflicts), git show usually only shows something like commit 0e1329e551a5700614a2a34d8101e92fd9f2cad6 (HEAD, master) Merge: fc17405 ee2de56 Author: Tilman Vogel <email@email> Date: Tue Feb 22 00:27:17 2011 +0100 Merge branch ‘testing’ into master This is because, for merges, git show uses the combined diff format which omits files that agree […]

Transfer gist repo to github

I am working on a small project with gist and since it is growing I would like to put it on github. Let’s suppose that: my gist repo is at: my new (empty) repo is at: The ideal solution would be one that pushes my changes on both the gist and the github […]

Getting Git to Acknowledge Previously Moved Files

I’ve moved a bunch of files around manually without thinking, and can’t find a way to get git to recognize that the files are just moved and not actually different files. Is there a way to do this other than removing old and adding the new (and thus losing the history), or redoing all the […]

How to properly commit in repository with Github Pages branch

i’ve got a question Situation based on gh-pages My project uses preprocessors and another difficult staff, so, my project stucture looks as follows: master branch ./-| /src /node_modules /public-| /js /css /etc index.html /etc package.json etc all code sources in src folder, compiled – into public folder. public folder also in .gitignore I would like […]

How does git detect that a file has been modified?

How does git detect a file modification so fast? Does it hash every file in the repo and compare SHA1s? This would take a lot of time, wouldn’t it? Or does it compare atime, ctime or mtime?

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