Skip to content

Instantly share code, notes, and snippets.

@cxhercules
Last active December 20, 2016 22:34
Show Gist options
  • Save cxhercules/5ba900789cf2063c762373dc868353a0 to your computer and use it in GitHub Desktop.
Save cxhercules/5ba900789cf2063c762373dc868353a0 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Create .gitkeep files to add "empty" folders to git
function gitkeep () {
find . -type d -empty -not -path "./.git/*" -exec touch {}/.gitkeep \;
}
# Docker
function docker-set () {
DockerStatus=`docker-machine status`
if [ "$DockerStatus" != "Running" ]; then
echo "$txtred Docker Engine is not started!"
else
eval $(docker-machine env default)
fi
}
# git log only my branch
function git-my-log () {
branch=`git status|awk '/On branch/ {print $3}'`
git log --no-merges develop..${branch} --oneline
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment