git status returns “fatal: Not a git repository” yet .git directory exists

I have a remote folder that I am currently unable to push to. When I go directly to the remote directory and a do a ‘git status’ it reads: fatal: Not a git repository The .git folder does exists and it was working fine yesterday and nothing has changed since. Can anyone tell me the […]

How do I git blame without seeing merges

If I’ve got a file whose history is like this: —-A—-B \ \ C—-D—-E and I do a blame from E then I’d like to see what changed in revisions B & C, but I don’t really care about D, since that was a merge. Is there a way I can do this? I guess […]

libgit2 returned: Refspec 'refs/heads/origin/HEAD' not found error in TortoiseGit

I got this error when starting up TortoiseGit: Could not get all refs. libgit2 returned: Refspec ‘refs/heads/origin/HEAD’ not found While annoying, it does not prevent me from using TortoiseGit. However, I’d like to make it go away, because it is, well, annoying. How do I fix this?

Git 1.8: it push error: dst ref refs/heads/master receives from more than one src

Another issue with git 1.8: $ git push error: dst ref refs/heads/master receives from more than one src. error: failed to push some refs to ‘gitosis@xxx.xx:xxx.git’ Suggestions? It was working before upgrading to 1.8. $ git remote -v origin gitosis@xxx.xx:xxx.git (fetch) origin gitosis@xxx.xx:xxx.git (push) After googling around I tried this first: $ git push origin […]

How to list the change history of the directory tree in git

Git does not track directories as such. It only tracks files that live in some directory. (See How can I add an empty directory to a Git repository?) However, if I have certain history of commits I implicitly also have history of changes to the directory tree. So how do I answer questions like: when […]

Showing git branch in ConEMU

Is there a way to show the branch in git somewhere visually (background or similiar) in ConEmu?

How to reorder last two commits in git?

I want to reorder last two commits in git: right now I have: $ git lg –oneline -4 1e0ecba (HEAD, my-branch) Fix for T255 82d45dc django_extensions af3953b improvements according to CR dae63ff Fullscreen support I want to have: $ git lg –oneline -4 82d45dc (HEAD, my-branch) django_extensions 1e0ecba Fix for T255 af3953b improvements according to […]

When cloning git repo under Windows I get “error: unable to create file <file>… (Is a directory)”

Z:\>git clone git://github.com/kennethreitz/httpbin.git Cloning into ‘httpbin’… remote: Counting objects: 1073, done. remote: Compressing objects: 100% (401/401), done. remote: Total 1073 (delta 672), reused 1045 (delta 651) Receiving objects: 100% (1073/1073), 114.42 KiB | 128 KiB/s, done. Resolving deltas: 100% (672/672), done. error: unable to create file httpbin/templates/… (Is a directory) git version 1.8.0.msysgit.0, Windows Vista […]

error: git checkout-index: unable to create file

What I am trying to do is a git clone on windows, but the parent repository exists in a unix machine. Am cloning using ssh to get a clone from UNIX to windows, and I get this weird error. error: git checkout-index: unable to create file <filename> This happens during the checkout step of a […]

Can I hg clone a git repository from BitBucket?

I am trying to use a BitBucket git repository, but I personally prefer using hg. This works: git clone https://myuser@bitbucket.org/projectuser/project.git It prompts me for a password, then clones the repository as expected. However, hg does not work: hg clone https://myuser@bitbucket.org/projectuser/project.git This gives me a 404 error. I do have the hggit extension installed. If I […]

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