Created
April 16, 2019 14:35
-
-
Save drews256/5c45953087ad99c577600e1880ec415f to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
function simple() | |
{ | |
echo 'git rebase is great' | |
mkdir gitexample | |
cd gitexample | |
git init | |
mkdir lib | |
touch lib/my_thing.rb | |
echo "class MyThing; def my_method; 1 + 1 == 2; end; end" | tee lib/my_thing.rb | |
git add lib/my_thing.rb | |
git commit -m 'Commit 1' | |
echo "class MyThing; def my_method; 1 + 2 == 3; end; end" | tee lib/my_thing.rb | |
git add lib/my_thing.rb | |
git commit -m 'Commit 2' | |
echo "class MyThing; def my_method; 1 + 3 == 4; end; end" | tee lib/my_thing.rb | |
git add lib/my_thing.rb | |
git commit -m 'Commit 3' | |
git co -B My_Feature_Branch | |
echo "class MyThing; def my_method; 1 + 4 == 5; end; end" | tee lib/my_thing.rb | |
git add lib/my_thing.rb | |
git commit -m 'My Feature Commit 1' | |
echo "class MyThing; def my_method; 1 + 5 == 6; end; end" | tee lib/my_thing.rb | |
git add lib/my_thing.rb | |
git commit -m 'My Feature Commit 2' | |
git checkout master | |
echo "class MyThing; def my_method; 1 + 6 == 7; end; end" | tee lib/my_thing.rb | |
git add lib/my_thing.rb | |
git commit -m 'Commit 4' | |
echo "class MyThing; def my_method; 1 + 7 == 8; end; end" | tee lib/my_thing.rb | |
git add lib/my_thing.rb | |
git commit -m 'Commit 5' | |
} | |
simple | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment