Skip to content

Instantly share code, notes, and snippets.

@rmariuzzo
Last active February 26, 2020 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmariuzzo/e97921b2892ce7a6816442a4aa1c6a48 to your computer and use it in GitHub Desktop.
Save rmariuzzo/e97921b2892ce7a6816442a4aa1c6a48 to your computer and use it in GitHub Desktop.
#!/bin/bash
git checkout master
git pull origin master
git branch | grep -v "master\|develop" | xargs git branch -D
{
"name": "npx-git-rebase-master",
"version": "0.0.0",
"bin": "./run.js",
"files": ["run.js", "git-restart.sh"],
"dependencies": {
"shelljs": "latest"
}
}
#!/usr/bin/env node
require('shelljs').exec('./git-restart.sh')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment