Tidy up and add's slides on remotes
This commit is contained in:
parent
94607bbdea
commit
312d654ea8
5 changed files with 315 additions and 61 deletions
16
shell/add-remote
Executable file
16
shell/add-remote
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
(
|
||||
rm -rf /tmp/demo-remote
|
||||
mkdir -p /tmp/demo-remote
|
||||
git init --bare /tmp/demo-remote
|
||||
git remote remove origin
|
||||
) > /dev/null 2>&1
|
||||
|
||||
cd /tmp/demo
|
||||
echo '$ git remote add origin /tmp/demo-remote'
|
||||
git remote add origin /tmp/demo-remote
|
||||
echo '$ git remote'
|
||||
git remote
|
||||
echo '$ git remote get-url origin'
|
||||
git remote get-url origin
|
26
shell/fetch-merge-pull
Executable file
26
shell/fetch-merge-pull
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$(dirname "$(readlink -f "$0")")"
|
||||
(
|
||||
rm -rf /tmp/demo-clone
|
||||
git clone /tmp/demo-remote /tmp/demo-clone
|
||||
cd /tmp/demo-clone
|
||||
git config user.name "Bob Bobbington"
|
||||
cp "${DIR}/../code-examples/python-with-cow.py" greeting.py > /dev/null
|
||||
git add greeting.py
|
||||
git commit -m "Adds Cow option"
|
||||
git push
|
||||
) > /dev/null 2>&1
|
||||
|
||||
cd /tmp/demo/
|
||||
echo '$ git fetch'
|
||||
git fetch
|
||||
|
||||
echo '$ git status'
|
||||
git -c color.ui=always status
|
||||
|
||||
echo '$ git log --oneline --all --graph'
|
||||
git -c color.ui=always log --oneline --all --graph --decorate=short
|
||||
|
||||
echo '$ git merge'
|
||||
git -c color.ui=always merge origin/master
|
12
shell/set-upstream-push
Executable file
12
shell/set-upstream-push
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
|
||||
echo '$ git branch --set-upstream-to=origin/master master'
|
||||
git branch --set-upstream-to=origin/master master
|
||||
|
||||
echo '$ git push'
|
||||
git push
|
||||
|
||||
echo '$ git status'
|
||||
git -c color.ui=always status
|
Loading…
Add table
Add a link
Reference in a new issue