ブランチdevelop
があり、そこから新しいブランチを作成しましたgit checkout -b syntax_highlight
。
問題は、新しいブランチに移動すると、新しいブランチとGemfile
親ブランチが異なることです。
のように、私はGemfile
バックグラウンドで開いていて、ブランチを切り替えると変化するのを見ることができます。
しかし、上演されたものは何もありません。
$ git checkout syntax_highlight
Already on 'syntax_highlight'
$ git rebase develop
Current branch syntax_highlight is up to date.
$ git checkout develop
Switched to branch 'develop'
$ git checkout syntax_highlight
Switched to branch 'syntax_highlight'
$ git checkout develop
Switched to branch 'develop'
$ git status
# On branch develop
nothing to commit (working directory clean)
$ git checkout syntax_highlight
Switched to branch 'syntax_highlight'
$ git status
# On branch syntax_highlight
nothing to commit (working directory clean)
私の人生では、なぜ私Gemfile
のものに違いがあるのか\u200b\u200bわからないので、gitが教えてくれない他の違いがあるのではないかと思います。
編集 1
git log
両方のブランチで実行すると、ブランチに 1 つ新しいコミットがあることを除いて、両方のコミットが同じであることがわかります。これsyntax_highlight
は、私が現在取り組んでいるブランチであるため、理にかなっています。
$ git log
commit a0b320a001cb24f42e2cf0f3dfee38cfd53e2290
Author: marcamillion
Date: Thu Mar 28 02:27:08 2013 -0500
Got the HABTM counter_cache working.
commit 64b73338c34259f02daa2ed943bd5d47ac5bacc0
Author: marcamillion
Date: Mon Mar 25 03:16:43 2013 -0500
Added the basic sidebar layout.
commit 7989813e9a379e480500f12ee01367967b791cd4
Author: marcamillion
Date: Sun Mar 24 14:36:33 2013 -0500
Got the basics of the sidebar layout, along with the navigational bar listing useful tags.
commit 1f0feea2f6db36e5c89aaf83c51cfc3b4bdbf01f
Author: marcamillion
Date: Sun Mar 24 02:48:20 2013 -0500
Installed bullet gem.
##
$ git checkout syntax_highlight
Switched to branch 'syntax_highlight'
$ git log
commit cccc5cd3350dbcd751e1ceccd0d4865948fd6993
Author: marcamillion
Date: Thu Mar 28 03:02:20 2013 -0500
Installed pygments, but haven't been able to test successfully yet.
commit a0b320a001cb24f42e2cf0f3dfee38cfd53e2290
Author: marcamillion
Date: Thu Mar 28 02:27:08 2013 -0500
Got the HABTM counter_cache working.
commit 64b73338c34259f02daa2ed943bd5d47ac5bacc0
Author: marcamillion
Date: Mon Mar 25 03:16:43 2013 -0500
Added the basic sidebar layout.
commit 7989813e9a379e480500f12ee01367967b791cd4
Author: marcamillion
Date: Sun Mar 24 14:36:33 2013 -0500
Got the basics of the sidebar layout, along with the navigational bar listing useful tags.
commit 1f0feea2f6db36e5c89aaf83c51cfc3b4bdbf01f
Author: marcamillion
Date: Sun Mar 24 02:48:20 2013 -0500
Installed bullet gem.
編集 2
これは、git diff
特定のの結果です。
$ git diff-tree --no-commit-id --name-only -r cccc5cd3350dbcd751e1ceccd0d4865948fd6993
Gemfile
Gemfile.lock
app/assets/stylesheets/pygments.css.erb
app/views/home/index.html.erb