Adds references and branches slides
Mostly adds slides about references and branches. Also tweaked python start code and re-aranged / tweaked some existing slides
This commit is contained in:
parent
22ef5f581d
commit
c6c938207f
9 changed files with 272 additions and 31 deletions
9
shell/branch-diff
Executable file
9
shell/branch-diff
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo/
|
||||
|
||||
echo '$ git log --oneline --all --graph'
|
||||
git -c color.ui=always log --oneline --all --graph --decorate=short
|
||||
|
||||
echo '$ git diff mater..test'
|
||||
git -c color.ui=always diff master..test
|
8
shell/cat-master-and-head
Executable file
8
shell/cat-master-and-head
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
|
||||
echo '$ cat .git/refs/heads/master'
|
||||
cat .git/refs/heads/master
|
||||
echo '$ cat .git/HEAD'
|
||||
cat .git/HEAD
|
13
shell/create-first-branch
Executable file
13
shell/create-first-branch
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
git switch master > /dev/null
|
||||
git branch -D test > /dev/null
|
||||
echo '$ git branch -v'
|
||||
git -c color.ui=always branch -v
|
||||
echo '$ git switch -c test'
|
||||
git -c color.ui=always switch -c test
|
||||
echo '$ git branch -v'
|
||||
git -c color.ui=always branch -v
|
||||
echo '$ git log --oneline --all'
|
||||
git -c color.ui=always log --oneline --all --decorate=short
|
7
shell/delete-test-branch
Executable file
7
shell/delete-test-branch
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
echo '$ git switch master'
|
||||
git switch master
|
||||
echo '$ git branch -d test'
|
||||
git branch -d test
|
21
shell/differing-branches-simple
Executable file
21
shell/differing-branches-simple
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
echo '$ git switch master'
|
||||
git switch master
|
||||
echo '$ vim greeting.py'
|
||||
sed -i 's/Hello World/HELLO WORLD/g' greeting.py > /dev/null
|
||||
echo ' # CAPITALISE HELLO WORLD #'
|
||||
echo '$ git commit -am "Capitalises Hello World"'
|
||||
git -c color.ui=always commit -am "Capitalises Hello World"
|
||||
echo '$ git switch test'
|
||||
git switch test
|
||||
echo '$ vim greeting.py'
|
||||
sed -i '3iimport sys\n' greeting.py > /dev/null
|
||||
echo ' # Adds the line "import sys" #'
|
||||
echo '$ git commit -am "Adds sys import for arg parsing"'
|
||||
git commit -am "Adds sys import for arg parsing"
|
||||
#echo '$ git diff master..test'
|
||||
#git -c color.ui=always diff master..test
|
||||
#echo '$ git log --all --oneline --graph'
|
||||
#git -c color.ui=always log --all --oneline --graph --decorate=short
|
|
@ -6,3 +6,5 @@ echo '$ cd /tmp/demo'
|
|||
cd /tmp/demo/
|
||||
echo '$ git init'
|
||||
git -c colour.ui=always init
|
||||
echo '$ git status'
|
||||
git -c colour.ui=always status
|
||||
|
|
9
shell/simple-merge
Executable file
9
shell/simple-merge
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
echo '$ git switch master'
|
||||
git switch master
|
||||
echo '$ git merge test'
|
||||
git merge test
|
||||
echo '$ git log --oneline --all --graph'
|
||||
git -c color.ui=always log --oneline --all --graph --decorate=short
|
Loading…
Add table
Add a link
Reference in a new issue