Monday, December 23, 2013

BASH scripting GIT branch creation

This creates a develop branch if it doesn't exist already

create_develop_branchifNotExists() {
branch="develop"

if git show-ref --verify --quiet "refs/heads/$branch"; then
#echo >&2 "Branch '$branch' exists."
echo ""
else
#read -p "Do you really want to create branch $branch " ans
#echo $ans
echo "Creating $branch branch"
git branch $branch
git branch -a #show all branches
fi
}


# And the following lines assume you've already checked in all your changes. It will switch to develop branch and merge your changes from master into develop branch and go back to master branch.

create_develop_branchifNotExists
echo "========== MERGING Current branch into develop branch ============="
git checkout develop
git merge master

git checkout master

Thursday, December 12, 2013

AudioBook Resources

I am an avid Podcast listener and found it so refreshing to find http://www.booksshouldbefree.com/ that I am blogging about it so I don't forget it. What I find most useful about it is its use of RSS to allow you to add the ebook to your favorite RSS podcast program. For example,

Moby Dick is available here and here's a screenshot of the many options it gives you to consume it: