diff --git a/gpm.hs b/gpm.hs index 6a50136..63775e3 100644 --- a/gpm.hs +++ b/gpm.hs @@ -4,7 +4,7 @@ #! nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/16d475334409f7fa632929b2838421b4ffe34927.tar.gz" {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} -import Protolude hiding (stdout,(%)) +import Protolude hiding (stdout) import Turtle main :: IO () @@ -23,6 +23,13 @@ mkNewEmptyBranch br = do echo "cleanup the branch" debug "git rm --cached -r ." +mkNewEmptyBranch :: Text -> IO () +mkNewEmptyBranch br = do + echo "create a new branch "<> br <> " (be sure the branch " <> br <> " doesn't already exists)" + debug $ "git checkout --orphan " <> br + echo "cleanup the branch" + debug "git rm --cached -r ." + debug :: Text -> IO () debug cmd = do putText cmd