Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
39 lines (29 sloc)
645 Bytes
This file contains 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
#!/usr/bin/env bash | |
rm -rf branch-without-branch | |
mkdir branch-without-branch | |
cd branch-without-branch | |
git init | |
touch zork | |
git add . | |
git commit -m "Initial commit" | |
echo 1 > zork | |
git add . | |
git commit -m "Starting with 1" | |
split=$(git rev-parse HEAD) | |
echo 1.1.1 >> zork | |
git add . | |
git commit -m "Added 1.1.1" | |
echo 1.1.2 >> zork | |
git add . | |
git commit -m "Added 1.1.2" | |
master=$(git rev-parse master) | |
git checkout ${split} 2> /dev/null | |
git branch -D master | |
echo 1.2.1 >> zork | |
git add . | |
git commit -m "Added 1.2.1" | |
echo 1.2.2 >> zork | |
git add . | |
git commit -m "Added 1.2.2" | |
# echo "Branch 1 - $(git rev-parse HEAD)" | |
# echo "Branch 2 - ${master}" |