I have an existing laravel project which used an older version of Laravel 5.1. I wanted to upgrade my project to use Laravel 5.1.2.
I followed this tutorial. So I added the
laravel/laravel github repository into my git project as a remote called
laravel, fetched it, then I created a new local branch named
laravel/master as the remote.
Then I switched back to my
develop branch, ran
git merge framework and fixed all the conflicts, then I ran
git commit -m "Upgrade to Laravel 5.1.2" && git push
Now here comes the problem, after I pushed I noticed my
develop branch got all the commits (over 4000) from the laravel/laravel project, which I really do not want littering my git log. Is there any way to not have to add all the commits from the framework, but only the "Upgrade to Laravel 5.1.2" message? Is it possible to fix this afterwards anymore?
EDIT: Okay, I managed to fix my current commit history like this:
git reset --soft HEAD~1 git commit -am "...." git push --force
but I have no idea how it magically got fixed with that, and how can I in the future avoid littering my commit history when merging a big remote repository