Skip to content

Commit

Permalink
Reset local changes before pulling
Browse files Browse the repository at this point in the history
  • Loading branch information
vitobotta committed Nov 6, 2023
1 parent 8d03959 commit 89acdd2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sync-history.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ last_executed_time=$(cat $last_command_timestamp_file 2>/dev/null || echo 0)

if (( current_time - last_executed_time >= 30 )) || [ "$force_sync" = "-f" ]; then
{
git -C $repo_dir reset --hard > /dev/null 2>&1
git -C $repo_dir fetch > /dev/null 2>&1
git -C $repo_dir merge -X theirs -m "Merging fetched changes" > /dev/null 2>&1

Expand Down

0 comments on commit 89acdd2

Please sign in to comment.