I have a remote Git server, here is the scenario which I want to perform:
For each bug/feature I create a different Git branch
I keep on com
Suppose you worked in feature/task1 with multiple commits.
Go to your project branch (project/my_project)
git checkout project/my_project
Create a new branch (feature/task1_bugfix)
git checkout -b feature/task1_bugfix
Marge with the --squash option
git merge --squash feature/task1
Create a single commit
git commit -am "add single comments"
Push your branch
git push --set-upstream origin feature/task1_bugfix