简体   繁体   English

cygwin上的svn-git命令git branch

[英]the command git branch for svn-git on cygwin

I use the svn git supported by the Cygwin packages[ie setup.exe ]. 我使用Cygwin包支持的svn git [即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...] [我看到a.txt在那里......]

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. 要避免,请将本地创建的文件添加并提交到特定分支,然后进行切换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM