diff --git a/src/git.rs b/src/git.rs index 775aa8b..c261286 100644 --- a/src/git.rs +++ b/src/git.rs @@ -36,7 +36,11 @@ pub fn create_new_branch(branch: &str) { /// Push the current repository to remote pub fn push(force: bool) { - // TODO : Refuse push if WIP commit present + if last_commit().as_str() == "WIP" { + println!("{}", "Refusing to push WIP commit".paint(Color::Red)); + std::process::exit(1); + } + let mut cmd = Exec::cmd("git") .arg("push") .arg("--set-upstream")