我的设置是:
$ git remote show origin
* remote origin
Fetch URL: ssh://repo.xxx/project.git
Push URL: ssh://repo.xxx/project.git
HEAD branch: master
Remote branches:
test tracked
test2 tracked
Local refs configured for 'git push':
test pushes to test (up to date)
test2 pushes to test2 (up to date)
我在分支 test2 上,我添加了一个新文件,提交并推送。现在我签出“测试”分支并发出 git pull:
touch file.txt
git add file.txt
git commit -m "file.txt"
git push
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 241 bytes, done.
Total 2 (delta 0), reused 0 (delta 0)
To ssh://repo.xxx/project.git
98dd105..fbbd238 test2 -> test2
git checkout test
git pull
突然'test2' 分支的内容被合并到我当前的'test' 分支中。
到底是怎么回事?