A reference for myself, and possibly for future people who may want to know how to do this.

Suppose you have a Git submodule, and you checked out a branch by its SHA1 ID because it had no branch name or tag where you want it. Later you want to know which SHA1 ID you checked out.

git branch --verbose --no-abbrev

This will give you an output such as:

* (no branch) 71528b1825ce5184b23d09f923cb72f4073ce8ed Previously we only added the "lib" subdirectory to the load path when setting up gem dependencies for frozen gems. Now we add the "ext" subdirectory as well for those gems which have compiled C extensions as well. [Wincent Colaiuta]
master 6e754551254a8cc64e034163f5d0dc155b450388 Merge docrails changes

So, again for my own reference, i'd like to check out the following SHA1 IDs to use with MyChores:

Rails: 71528b1825ce5184b23d09f923cb72f4073ce8ed
Rspec: cb7ff4852331fafd1143d610ffefcdce2dd85c20
Rspec-rails: ee0fc3da63e3412d4df36c47fb2eda27127fd9d8

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s