How do I compare two git repositories?

I’ve got two different exports of our CVS repository into git. They diverge at some point, and I’m doing some investigation into why. The development line goes back several years and over tens of thousands of commits. At the beginning of the development line, the SHA1 IDs for each commit are identical, telling me that […]

getting “fatal: not a git repository: '.'” when using post-update hook to execute 'git pull' on another repo

I’m new to git so I apologize (and please correct me) if I misuse terminology here, but I’ll do my best. I’m trying to set up a bare git repo (hub) and a development site working copy (prime) on a web server. I’ve tried to pattern it after this article. I want the development working […]

How to I “move” my commits from “no branch” to an actual branch?

I made a mistake, and started making commits “to the last tag”, which lands my commits in “no branch“. They should have been applied at the head of an already existing branch. I have not pushed my changes yet. I’ve found a few other question for when commits are in the wrong branch, but now […]

Using GIT on USB stick for “travelling code”

I have exhaustively searched for answers to my question here and on Google. I have found some great resources and learning tools for understanding Git and what it does, but I need to get some clarification, and assistance. What I am doing is working on a side-project for work both at my office and at […]

How to solve “/usr/bin/env: ruby_executable_hooks: No such file or directory”?

I just deploy jekyll in a vps, and config git post-receive hook on it. When I push blog update to vps from my laptop, I run into this error: remote: /usr/bin/env: ruby_executable_hooks: No such file or directory I searched for a while, and tried the method proposed in this post: bundle update: env: ruby_executable_hooks: No […]

View differences of branches with meld?

I know that I can view the difference between HEAD and current state with meld .. But how can I view the differences between branches, for example master and devel with meld? At the moment I do the following steps: Rename folder of working copy For example mv /projectA /projectA_master) Clone the project again git […]

How to protect “master” in github?

I have a few contributors in my github project. I want to allow only one of them to “push” to master. And this guy is not me (the owner of the repository). Is it possible to do?

How can I rewrite history so that all files, except the ones I already moved, are in a subdirectory?

I have a project under git. One day I moved all project files from current directory to foo/bar/ under the project. I did it using git mv. Then I added some more files and did some changes to already existing files. As a result, now when I look at the history of foo/bar/file.c, I can […]

How to “cat” a file in JGit?

A while back I was looking for an embeddable distributed version control system in Java, and I think I have found it in JGit, which is a pure Java implementation of git. However, there is not much in the way of sample code or tutorials. How can I use JGit to retrieve the HEAD version […]

git: can't push (unpacker error) related to permission issues

I have this problem when i try to push in git: error: insufficient permission for adding an object to repository database ./objects fatal: failed to write object error: unpack failed: unpack-objects abnormal exit To ssh://<repo url>/<repo dir> ! [remote rejected] master -> master (n/a (unpacker error)) error: failed to push some refs to ‘ssh://<repo url>/<repo […]

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