I have a repository which is shared by more than 1 person So often I see there are a lot of merge commits in commit history. I want to get rid of them to make my commit history to look cleaner.
What is the practice we should follow to avoid these merge commits? Is it doable ?
I read about merging using --ff-only
switch. Can this switch help me ?
If you have your local changes which are not pushed to remote yet, and if you pull latest updates from remote it will create a merge commit. To avoid this try
git pull --rebase
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With