Git: how to push submodule to a remote repository?

I use git to track website I’m working on. I work on my machine and push commits to a remote server configured following this guide: using Git to manage a website. Last week I tried using Git submodules to manage some third party libraries and today I tried pushing to the server, finding out that […]

Most developed magit/github extension for emacs for pull requests

I’m specifically interested in pull requests, editing issues and tying them to commits, and other things I generally have to use hub on the command line for. However, I’ve started using magit and really like the keybindings and general interface—I’d like to stay in emacs for this part, too, rather than needing to keep an […]

switching a subdirectory managed by git to a submodule

We used to have a local hack of delayed_job in a Rails app, in vendor/plugins/delayed_job. It was installed as a one-time event and checked into git in the main app repo. Now we decided to fork delayed_job on github and replace the subdirectory by a git submodule, as described e.g. here: Before doing that, […]

How can I set up autocompletion for Git commands?

I have Git (version bash compeletion working on my Debian squeeze (6.0). Git was installed with aptitude and I am using standard debian‘s bash, which supports command line autocompletion. Now, I just installed Git ( on an other machine (Lenny/Debian 5.0) and the there is no autocompletion. Why is Git autocomplete not working on […]

Git: distinguish between local and remote tags

If there are tags in the remote repository, I’m usually getting them automatically when pulling. When I delete the created local tag (git tag -d <tag-name>) and pull, the deleted tag will be recreated. I can delete remote branches/tags (git push <remote-branch/tag-name>:<branch/tag-name>), but how can I detect that the local tag was created by fetching […]

Why do I get error: RPC failed; result=52, HTTP code = 0 fatal: The remote end hung up unexpectedly when pushing to github?

I created a new repository on github and wanted to push some files. So I initialize the repository like normal and do git add . to add the current directory (which is my java project folder with bin and src folder inside). Then I added the remote directory using: git remote add Then I […]

How can I merge a branch into master but continue working on the branch?

I created a branch to try a different approach and it worked, so I would like to merge the “Farmcrops” branch into “Master” to keep those changes but continue the “Farmcrops” branch to explore another possibility. That way, if this latest change doesn’t work, I can revert back to “Master” which would now include the […]

Configure git to track only one file extension

I have one directory tree with many kind of different files. There are 300 directories on the parent directory. Each directory could have other sub directories. I only want to track *.cocci on all sub directories. Here is my .gitignore: * !*.cocci But it do not work, as the files on sub directories are not […]

Get the difference between two branches in Git

I did following (I simplified this comparing to a reality): created a branch Branch1, switched to it added file File1 and modified existing file File2 and commited this figured out that I don’t need File1, removed it and commited this So, the actual difference between original branch and Branch1 is only modification of File2. I […]

How can I get the current git branch in gradle?

I’m writing a task to deploy my application to the server. However, I’d like for this task to run only if my current git branch is the master branch. How can I get the current git branch? gradle-git approach: I know there is a gradle-git plugin that has a method getWorkingBranch() under the task GitBranchList, […]

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