Well, it depends on which version control you use.
If you use GIT , it is simple. Once you have created a new branch in the user interface, you just need to βcheckβ the new branch. Any uncommitted changes will automatically point to a new branch. Then you can fix them.
If you use TFVC , you need to postpone the changes in the source branch and delete them on another branch . This function is provided using the tfpt unshelve /migrate command. More detailed steps, please ask a question: TFS: post changes made locally in one branch to another branch
This is also a sample that shows the difference between GIT and TFVC.
source share