After using "eb deploy" integrated to source control the CodeCommit remote repo is updated (I can see in AWS Console that the commit is there, in the cloud repo) and the EC2 instance is correctly running the new deployed version (can see it also through AWS Console).
The problem: all things are synced but GIT says the remote repo is one commit behind it is actually is.
When I type "git status" it says: Your branch is ahead of 'codecommit-origin/master' by 1 commit. (use "git push" to publish your local commits)
When I type "git log codecommit-origin/master" is does not show the last commit.
Why is GIT saying my local repo is ahead of remote when clearly in the AWS Console the remote CodeCommit repo is up-to-date? Could be that "eb deploy" pushing to CodeCommit is not actually a "git push" command?
I actually have "re-run" the command eb init -i going through the setup again and it worked:
Then I run git status and git log codecommit-origin/master and things are correctly synced now:
$ git status
On branch master
Your branch is up-to-date with 'codecommit-origin/master'.
nothing to commit, working directory clean