Created
September 26, 2012 07:47
-
-
Save dpwright/3786642 to your computer and use it in GitHub Desktop.
Demonstrating git's use of HEAD as default branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$git init repo1 | |
Initialized empty Git repository in /home/daniel/liamtest/repo1/.git/ | |
$cd repo1 | |
$git ci --allow-empty -m "Commit on master" | |
[master (root-commit) cf699b0] Commit on master | |
$git co --orphan another-branch | |
Switched to a new branch 'another-branch' | |
$git ci --allow-empty -m "Commit on another-branch" | |
[another-branch (root-commit) 06f7586] Commit on another-branch | |
$cd .. | |
$git clone repo1/ repo2 | |
Cloning into 'repo2'... | |
done. | |
$cd repo2 | |
$git log | |
commit 06f7586381a9f96b3fbcbd49ed85c7a9c81a03da | |
Author: Daniel P. Wright <[email protected]> | |
Date: Wed Sep 26 16:40:36 2012 +0900 | |
Commit on another-branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment