Either commit the uncommitted code, so you don’t lose it (remember: uncommitted code does not exist in the Git repository, so deleting it will be permanent!), or you can stash it so you can continue working on it later.
To delete a branch, you can use git branch -d branchname
. This will only work if you have merged the changes in somewhere else (e.g. master or develop), so again, you don’t lose any work. If you want to delete it anyway, you can use git branch -D
(upper case D) instead.