Why does git-rebase give me merge conflicts when all I’m doing is squashing commits?

If you don’t mind creating a new branch, this is how I dealt with the problem:

Being on main:

# create a new branch
git checkout -b new_clean_branch

# apply all changes
git merge original_messy_branch

# forget the commits but have the changes staged for commit
git reset --soft main        

git commit -m "Squashed changes from original_messy_branch"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)