Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # -*- mode: sh; coding: us-ascii-unix -*-
- set -e -E -u
- REPO="demodir"
- rm -rf "$REPO"
- mkdir -p "$REPO"
- cd "$REPO"
- git init
- git config user.email "me@me.org"
- git config user.name "me"
- git commit --allow-empty -m "Empty initial state."
- git commit --allow-empty -m $'We start from here.\nBla bla bla.'
- echo hello > hello.txt
- echo world > world.txt
- git add .
- git commit -m $'First commit.'
- echo foo.bar > hello.txt
- git add .
- git commit -m $'Second commit\nWith more details in the body.'
- delim() {
- echo
- echo ------------------------------------------------------------------------------
- echo
- }
- run(){
- printf ">> "
- printf "%q " "$@"
- printf "\n"
- "$@"
- }
- indent(){
- while IFS= read -r LINE; do
- echo " $LINE"
- done
- }
- delim
- run git log -3 --graph --name-status | indent
- delim
- run git log -3 --graph --name-status --format="%h:%s" | indent
- delim
- run git log -3 --graph --name-status --format="%n%h:%s" | indent
- delim
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement