This commit is contained in:
Yann Esposito (Yogsototh) 2018-08-29 18:24:42 +02:00
commit 4076802e8f
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

9
gpm.hs
View file

@ -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