这是一个创建于 2453 天前的主题,其中的信息可能已经有所发展或是发生改变。
➜ android git:(feature-new-ui) ✗ git status -s
➜ android git:(feature-new-ui) git checkout develop
Switched to branch 'develop'
Your branch is ahead of 'origin/develop' by 1 commit.
(use "git push" to publish your local commits)
➜ android git:(develop) git status -s
➜ android git:(develop) git checkout feature-new-ui
Switched to branch 'feature-new-ui'
Your branch is ahead of 'origin/feature-new-ui' by 2 commits.
(use "git push" to publish your local commits)
➜ android git:(feature-new-ui) ✗ git status -s
D ByteParser/build.gradle
D ByteParser/src/main/java/com/nd/byteparser/ByteParser.java
当前分支是 feature-new-ui 是干净的,
从 feature-new-ui 切到 develop, develop 也是干净的,
再从 develop 切到 feature-new-ui
这时,多了两条文件发生变化的记录,
这是什么原因???
第 1 条附言 · 2017-08-08 20:55:10 +08:00
在 feature-new-ui 分支里 reset hard 到 HEAD 解决了,下次再来回切分支又出现了
5 条回复 • 2017-08-09 15:16:30 +08:00
|
|
2
majinjing3 2017-08-09 00:40:54 +08:00 via Android
.gitignore 引起的吧,
|
|
|
3
kaminic 2017-08-09 09:49:48 +08:00
|
|
|
4
TimRChen 2017-08-09 10:38:35 +08:00
切到 feature-new-ui 分支时,有两个 commit,你应该 git stash 暂存,然后再切回
|
|
|
5
kaminic 2017-08-09 15:16:30 +08:00
@ TimRChen 暂存是对于不干净的工作区来说的,我的工作区已经是干净的了,两个 commit 是说我本地有两个 commit 没有 push
|