# create branch from develop
git pull
git checkout -b feature/my-feature

# work on branch and commit work. repeat until work is done
git commit -am "implement my feature"
git push

# squash commits with an interactive rebase
# first, choose all commits to squash into one
git log --oneline

# second, squash the last x commits
# pick the one to squash into (usually the topmost), squash
# the others
git rebase -i HEAD~x

# forcepush these changes to the remote branch
git push --force

# refresh work done by others on develop in the meantime...
git checkout develop
git pull

# change back to feature branch and rebase
git checkout feature/my-feature
git rebase develop

# optional: resolve conflicts and then
git add .
git rebase --continue

# since we rewrote history, force push changes to branch
git push --force-with-lease

# after that, branch can be merged into develop