我不确定这是否是正确的地方问这个问题,如果不是,请重定向我。Git分支和ls
我是新来的混帐,同时学习它我偶然发现了这一点。 git branch branchName
和'ls'是如何相互协作的。 例如: 如果我有一个主分支和测试分支,并且测试分支与主分支相比有额外的testFile。 现在,而在主分支,如果我ls
,我就不会看到TESTFILE但切换到测试分支和ls
后,我会看到TESTFILE
[email protected]:/media/kiran/Linux_Server/dev$ git branch
master
* test
[email protected]:/media/kiran/Linux_Server/dev$ git checkout master
M editor/editor_parts/syntax/operator_syntax.js
Switched to branch 'master'
[email protected]:/media/kiran/Linux_Server/dev$ ls
cgi-bin index.php misc underConstruction
editor jquery-1.5.2.min.js php.php userManage
fileManage jquery-ui-1.8.11.custom.css projectManage userPages
images login test.php
[email protected]:/media/kiran/Linux_Server/dev$ git checkout test
M editor/editor_parts/syntax/operator_syntax.js
Switched to branch 'test'
[email protected]:/media/kiran/Linux_Server/dev$ ls
cgi-bin index.php misc test.php
editor jquery-1.5.2.min.js php.php underConstruction
fileManage jquery-ui-1.8.11.custom.css projectManage userManage
images login testFile.txt userPages
[email protected]:/media/kiran/Linux_Server/dev$
但pwd
来自两个支路显示同一地点。
那么,开关分支怎么改变ls
的输出(据我了解是linux的一个函数)?