Preserve history with merge commits.
A safer, beginner-friendly approach that preserves history and avoids force pushing.
# feature → develop
git checkout develop
git pull origin develop
git checkout feature
git merge develop --no-commit --no-ff
# resolve conflicts, if any
git commit -am 'merged with develop'
git push origin feature