diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb74bd..916eb6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.4.1] - 2024-03-11 + +### Changed +- Fixed 'would clobber existing tag' error when running 'git fetch' + ## [2.4.0] - 2024-01-29 ### Changed diff --git a/src/Git/Git.php b/src/Git/Git.php index bc6b369..1fd744d 100644 --- a/src/Git/Git.php +++ b/src/Git/Git.php @@ -41,7 +41,7 @@ public function is_repo() public function checkout($revision) { - list($output, $return) = $this->run_command(['git', 'fetch', '-a', '&&', 'git', 'checkout', $revision]); + list($output, $return) = $this->run_command(['git', 'fetch', '-a', '--force', '&&', 'git', 'checkout', $revision]); return $this->check_git_return('Checkout failed', $return, $output); } @@ -213,7 +213,7 @@ public function remote_revision_commit($revision) public function fetch() { - list($output, $return) = $this->run_command(['git', 'fetch', '-a']); + list($output, $return) = $this->run_command(['git', 'fetch', '-a', '--force']); return $this->check_git_return('Checkout failed', $return, $output); }