Adding a Git subrepository to Mercurial

I’ve been trying to set up a project using bitbucket which has project dependencies hosted on github. Using the Hg-Git Mercurial plugin I am able to almost get there. But when it comes time to push, things become troublesome. The documentation for Mercurial subrepositories states: 2.4 Push Mercurial will automatically attempt to first push all […]

show all tags in git log

Why does git log –decorate not display more than one tag per commit? EDIT: Charles Bailey has come up with the answer (at least in my case) Essentially, I had one tag that pointed to another tag that pointed to the commit. Because of this extra layer of indirection, the tag wasn’t showing up in […]

Create a git submodule from a specific repo hash or tag

I have a project which depends on Twitter bootstrap 2.x, however, when I add bootstrap as a submodule using the following: git submodule add This brings in the latest version of bootstrap. I would like to create a submodule for a specific tag, but haven’t found a way to do that. Is this possible?

Untangle two lines with `git add -p`

I’ve got a file with the following changes: # Manual hunk edit mode — see bottom for a quick guide @@ -280,6 +281,7 @@ if( foo ) { bla(); – test( true ); + removeThis(); + test( false ); } else How can I commit the change for test() only, and avoid committing removeThis() ? […]

Git commit bash script

I’m writing a bash script to add, commit, push all files in a directory. #!/bin/bash git add . read -p “Commit description: ” desc git commit -m $desc git push origin master I’m getting the following error: $ ./togithub Commit description: test commit script error: pathspec ‘commit’ did not match any file(s) known to git. […]

What is the shortest way to swap staged and unstaged changes in git?

If some changes are added to the index and there are some changes that are not added to the index, how do I swap this two sets of changes?

Git-svn: Bulk removing orphaned remote branches

A project in SVN I’m working on (via git-svn) has frequently-created branches that are then –reintegrated with trunk, and then deleted. Right now the project has about 10 branches that have not been deleted, but in git, git branch -r shows about 50. I can remove these one at a time, checking whether they still […]

Can git submodule update be made to fetch tags in submodules?

I have a git repository which uses a submodule which I’d like to point at an annotated tag, but when I do git submodule update new tags don’t get fetched. I can get new tags in the submodule by cd-ing into the submodule and doing a git fetch –tags there, but I’d really like to […]

Would you migrate from cvs to svn or directly to git or hg?

I don’t know if this is the right forum to ask. My company makes use of CVS as a version control system. We plan to move to a more modern version control system. What would you recommend as the least risky solution? My idea is to use Subversion but I also hear a lot of […]

How to input password to git pull command?

I have written scripts for Windows and Linux to essentially set up a new users workspace with all the git repositories from our server. I would like the user to enter the password for our server once, store it in a local variable, pass that variable to each git pull command, then erase the password […]

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