Reputation: 691
I was editing default layout file in my CakePHP project and created new branch, as I will need it to check new functionality. Problem is, when I switch to new branch, my default layout file reverts to it;s state, like it was few commits before. I need to have it's current version to add new functionality to it, and when merge my branch to master.
Maybe this behavior happened, because my workflow was like this:
Upvotes: 2
Views: 766
Reputation: 1326686
I commited all my changes to master after creating new branch :) And it was before switching
Then it seems normal to see a previous state when you switch to the new branch.
Try merging the branch (say master
) from which the new branch was created:
git checkout newBranch
# see old content
git merge master
# should see newer content
Upvotes: 1