Log list of unique branches you were on and easily switch between them.
Make sure you have Node installed (node -v
) with preferred version (latest recommended).
For basic, non development usage download built script to selected directory.
curl https://raw.githubusercontent.com/piotrkabacinski/checkh/master/build/checkh.js --output /usr/local/bin/checkh.js
...and being in a project directory with initiated git repository run script using:
node -e 'require("/bin/checkh.js").default()' [reflog checkouts amount]
For more convenient usage, consider applying script to some shell alias. .bash_profile
example:
echo "alias checkh=\"node -e 'require(\\\"/usr/local/bin/checkh.js\\\").default()'\"" >> ~/.bash_profile
checkh 20
For adjusting the script to own purposes I recommend cloning the repository. package.json
contain only dev dependencies.
npm test
npm run build