Skip to content

Commit 19407ed

Browse files
committed
Merge pull request kbjr#23 from mAAdhaTTah/master
Add `git rm` method GitRepo::rm
2 parents 29be29b + 8a2943c commit 19407ed

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Git.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,23 @@ public function add($files = "*") {
327327
}
328328
return $this->run("add $files -v");
329329
}
330+
331+
/**
332+
* Runs a `git rm` call
333+
*
334+
* Accepts a list of files to remove
335+
*
336+
* @access public
337+
* @param mixed files to remove
338+
* @return string
339+
*/
340+
public function rm($files = "*") {
341+
if (is_array($files)) {
342+
$files = '"'.implode('" "', $files).'"';
343+
}
344+
return $this->run("rm $files");
345+
}
346+
330347

331348
/**
332349
* Runs a `git commit` call

0 commit comments

Comments
 (0)