3 ms·
The raw shell for the workout is: rm -rf lgthw_* mkdir lgthw_origin cd lgthw_origin git init echo 1 > afile git add afile git commit -m firstcomm
by zwischenzug 9y ago
The raw shell for the workout is:
rm -rf lgthw_*
mkdir lgthw_origin
cd lgthw_origin
git init
echo 1 > afile
git add afile
git commit -m firstcommit
git log --oneline --decorate --all --graph
git branch otherbranch
git tag firstcommittag
git log --oneline --decorate --all --graph
echo 2 >> afile
git commit -am secondcommit
git checkout otherbranch
git log --oneline --decorate --all --graph
echo 3 >> afile
git commit -am thirdcommit
git log --oneline --decorate --all --graph
git checkout firstcommittag
git log --oneline --decorate --all --graph
git checkout -b firstcommitbranch
git log --oneline --decorate --all --graph
cd ..
git clone lgthw_origin lgthw_cloned
cd lgthw_cloned
git remote -v
git log --oneline --decorate --all --graph
git branch -a
git checkout master
cd ../lgthw_origin
git checkout master
echo origin_change >> afile
git commit -am 'Change on the origin'
cd ../lgthw_cloned
git fetch origin
git log --oneline --decorate --all --graph
git merge origin/master
git log --oneline --decorate --all --graph
cd ../lgthw_origin
echo origin_change_rebase >> afile
git commit -am 'origin change rebase'
git log --oneline --decorate --all --graph
cd ../lgthw_cloned
echo cloned_change_rebase >> anewfile
git add anewfile
git commit -m 'cloned change rebase in anewfile'
git log --oneline --decorate --all --graph
git fetch origin
git log --oneline --decorate --all --graph
git rebase origin/master
git log --oneline --decorate --all --graph