Search code examples
gitcygwingit-svn

the command git branch for svn-git on cygwin


I use the svn git supported by the Cygwin packages[i.e. setup.exe ].

I tried to create a second local branch on the local repo, and add a new file on the second branch. This new file should be only in the second branch since I haven't merge this branch to the master branch.

however after I checkout to the master branch, the file is there!!?? Any Ideas? Any help will be appreciate~~

my steps are:

git br haha
git co haha
touch a.txt
git add a.txt
git ci a.txt
git co master 

[I see a.txt is there...]


Solution

  • Whenever switching from branches the local files modifies with the checkout. To avoid, add and commit the locally created file to the specific branch and then switch.