You can merge your local modifications into the branch you want to checkout.
On your sprint1
branch do:
git checkout --merge dev
This will merge the local modifications of the working directory into the dev
branch and switch to it. The changes are just merged and not committed. So you can now go on as usual.
git add ....
git commit
From the git checkout documentation
--merge
When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context. However, with this option, a three-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch.