How To Clone An Older GIT Commit

A git repository contains the all history at all time. So when you are cloning a repository, you are cloning it with its full history, and then, you can make a branch from whatever commit you want:


git checkout -b aNewBranch SHA1

Example:

Derek@DELL8400 ~/workspace3/EDT-Tweaks2 (sensation)
$ git checkout -b Aug29 180a318445b04c1912e29fcbfc547849fe2dc5c5
Switched to a new branch ‘Aug29’

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s