git

Posted on October 20, 2008 to Rails and git  

This article covers this topic in depth.

I’ve switched to using git submodules to manage external plugins. Recently I forked the rbet library and added it to a project via git submodules:

git submodule add git://github.com/sbraford/rbet.git vendor/rbet

But wait, I have new changes in my rbet library that I’d like to pull into my app:

git submodule update

No dice.

Git submodules are tied to the specific revision of the external repository at the time of checkout. Once more, with enthusiasm!

Git submodules are tied to the specific revision of the external repository at the time of checkout.

To update rbet to the latest version in this example, I had to do a:

cd vendor/rbet
git remote update
git merge origin/master

Then to make sure these changes get reflected in my main app:

cd ../..
git add .
git commit -a -m “updated rbet to latest”
git push

And presto, we have successfully ninja-unicorned our git submodule.

Posted on October 03, 2008 to git  

When using Subversion, the command 'svn info' handily displays various metadata about your project, such as remote svn URL, etc.

Nothing exactly matches that in git, but to see the remote URL, you can do a:

git remote -v

Which will display something like:

origin  deploy@foo.githost.com:~/project