Yes committing works the same in the mainline. If you commit now you will commit your changes from the branch AND the changes made directly on the mainline.
Does this answer your question?
Yes no problem. When merging it will apply those changes. You can then do more changes and do all in one commit. It is best practise though to try to seperate commits in case you need to roll back a merge. Because it would role back all the changes.