I have been trying to set-up repository with gitlab CE, as a part of the set-up created a repo and been playing around with it, when I encountered, that after I make some modification to files and switch branch using checkout, I'm allowed to switch even though I have unstaged files, which was different from my previous experience that I was not allowed to checkout until I either did a commit or stash.
This experience beats the purpose of seamlessly switching branches without having to worry about unintended creeping in.
The steps are highlighted below.
somasundaram.s@user /d/projects/repositories/newrepo (master)
$ ls -ltr
total 1
-rw-r--r-- 1 somasundaram.s 1049089 13 Apr 4 16:28 README
-rw-r--r-- 1 somasundaram.s 1049089 0 Apr 4 16:31 hi
somasundaram.s@user /d/projects/repositories/newrepo (master)
$ git branch new-branch
somasundaram.s@user /d/projects/repositories/newrepo (master)
$ git checkout new-branch
Switched to branch 'new-branch'
somasundaram.s@user /d/projects/repositories/newrepo (new-branch)
$ touch newfile
somasundaram.s@user /d/projects/repositories/newrepo (new-branch)
$ ls -ltr
total 1
-rw-r--r-- 1 somasundaram.s 1049089 13 Apr 4 16:28 README
-rw-r--r-- 1 somasundaram.s 1049089 0 Apr 4 16:31 hi
-rw-r--r-- 1 somasundaram.s 1049089 0 Apr 4 16:37 newfile
somasundaram.s@user /d/projects/repositories/newrepo (new-branch)
$ git checkout master
Switched to branch 'master'
somasundaram.s@user /d/projects/repositories/newrepo (master)
$ ls -ltr
total 1
-rw-r--r-- 1 somasundaram.s 1049089 13 Apr 4 16:28 README
-rw-r--r-- 1 somasundaram.s 1049089 0 Apr 4 16:31 hi
-rw-r--r-- 1 somasundaram.s 1049089 0 Apr 4 16:37 newfile