I have recently git pushed work on an Openshift node.js application, yet the application failed to restart.
After analysis of the logs, it turns out that one file is out of sync between Openshift and my local PC.
The Openshift version has the following line (file is in the /app-root/repo/ directory):
var ac = require('../controllers/AdminControl.js');
The local PC version has this line:
var ac = require('../controllers/AdminController.js');
I can track the revision where this line was modified. It has been committed and pushed some time ago. I am using TortoiseGit under Windows 7, and it says there is nothing to fetch or to pull.
How come the git repository did not 'register' the modification? How can I solve this issue?
It's hard to be precise without having your repo itself, but this sort of thing happens when you make a change locally and then merge others' changes and choose your version. Let's say line 123 is the line before the require call and it has the string old in it, which you change to new:
$ silent-edit file.js
123s/old/new/
w
q
$ git commit -m 'change old to new'
...
$ git fetch origin; git merge origin/somebranch
[ ... conflict in file.js ... you resolve it manually by choosing your version ]
$ git commit -m 'merged upstream changes from somebranch'
You now have git convinced that you prefer line 124 to say AdminController rather than AdminControl. It will remain that way no matter how much you attempt to fetch or pull, at least until there is another merge conflict in that area and you are forced to resolve it again.
There are other ways to arrive at this same state (which is why I cannot be precise about how you got here). The point is, you've told your git to use your version, and it will keep using it, no matter how many changes you bring in from the upstream, unless and until either: