You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
724 B

#!/usr/bin/env bash
DIR="$(dirname "$(readlink -f "$0")")"
cd /tmp/demo
git switch master > /dev/null
git branch dog > /dev/null
cp "${DIR}/../code-examples/python-cat.py" greeting.py > /dev/null
git add greeting.py > /dev/null
git commit -m "Makes a cat say Meow" > /dev/null
git switch dog > /dev/null
cp "${DIR}/../code-examples/python-dog.py" greeting.py > /dev/null
git add greeting.py > /dev/null
git commit -m "Makes a dog say Woof" > /dev/null
git switch master > /dev/null
echo " # Make changes to 2 branches in the same place #"
echo '$ git switch master'
echo '$ git log --oneline --all --graph'
git -c color.ui=always log --oneline --all --graph --decorate=short
echo '$ git merge dog'
git merge dog --no-edit