C:\Users\io\gittest2>git status On branch master nothing to commit, working tree clean C:\Users\io\gittest2>git checkout newbr Switched to branch 'newbr' C:\Users\io\gittest2>git status On branch newbr nothing to commit, working tree clean C:\Users\io\gittest2>echo TRE >> file1 C:\Users\io\gittest2>git status On branch newbr Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) modified: file1 no changes added to commit (use "git add" and/or "git commit -a") C:\Users\io\gittest2>git checkout master error: Your local changes to the following files would be overwritten by checkout: file1 Please commit your changes or stash them before you switch branches. Aborting #################### # OK #################### C:\Users\io\gittest2>git status On branch newbr Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) modified: file1 no changes added to commit (use "git add" and/or "git commit -a") C:\Users\io\gittest2>git commit -a -m "third line" [newbr 3573539] third line 1 file changed, 1 insertion(+) C:\Users\io\gittest2>git checkout master Switched to branch 'master' C:\Users\io\gittest2>echo FROM MASTER >> file1 C:\Users\io\gittest2>git commit -a -m "from master" [master d55d746] from master 1 file changed, 1 insertion(+) C:\Users\io\gittest2>git checkout newbr Switched to branch 'newbr' C:\Users\io\gittest2>git status On branch newbr nothing to commit, working tree clean C:\Users\io\gittest2>echo FROM NEWBR 1 >> file1 C:\Users\io\gittest2>git status On branch newbr Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) modified: file1 no changes added to commit (use "git add" and/or "git commit -a") C:\Users\io\gittest2>git commit -a -m "from newbr" [newbr b774b92] from newbr 1 file changed, 1 insertion(+) C:\Users\io\gittest2>git checkout master Switched to branch 'master' # ok again C:\Users\io\gittest2>git checkout master Switched to branch 'master' C:\Users\io\gittest2>echo FROM MASTER 1 >> file2 C:\Users\io\gittest2>git add file2 C:\Users\io\gittest2>git commit -a -m"master 1" [master 489b9ee] master 1 1 file changed, 1 insertion(+) create mode 100644 file2 C:\Users\io\gittest2>type file2 FROM MASTER 1 C:\Users\io\gittest2>echo FROM MASTER 2 >> file2 C:\Users\io\gittest2>git commit -a -m"master 2" [master f9721b9] master 2 1 file changed, 1 insertion(+) C:\Users\io\gittest2>type file2 FROM MASTER 1 FROM MASTER 2 C:\Users\io\gittest2>git branch new C:\Users\io\gittest2>git checkout new Switched to branch 'new' C:\Users\io\gittest2>type file2 FROM MASTER 1 FROM MASTER 2 C:\Users\io\gittest2>echo FROM NEW 1 >> file2 C:\Users\io\gittest2>echo FROM NEW 2 >> file2 C:\Users\io\gittest2>git commit -a -m"new 1" [new dc62b5e] new 1 1 file changed, 2 insertions(+) C:\Users\io\gittest2>git checkout master Switched to branch 'master' C:\Users\io\gittest2>type file2 FROM MASTER 1 FROM MASTER 2 C:\Users\io\gittest2>git checkout new Switched to branch 'new' C:\Users\io\gittest2>type file2 FROM MASTER 1 FROM MASTER 2 FROM NEW 1 FROM NEW 2 C:\Users\io\gittest2>git checkout master Switched to branch 'master' C:\Users\io\gittest2>echo FROM MASTER 3 >> file2 C:\Users\io\gittest2>type file2 FROM MASTER 1 FROM MASTER 2 FROM MASTER 3 C:\Users\io\gittest2>git checkout new error: Your local changes to the following files would be overwritten by checkout: file2 Please commit your changes or stash them before you switch branches. Aborting C:\Users\io\gittest2>git commit -a -m"master 2" [master 73a0135] master 2 1 file changed, 1 insertion(+) C:\Users\io\gittest2>git checkout new Switched to branch 'new' C:\Users\io\gittest2>type file2 FROM MASTER 1 FROM MASTER 2 FROM NEW 1 FROM NEW 2 C:\Users\io\gittest2>