I've a rather worrying problem with git.
A few days ago I was committing some changes when the server git was on blue screened. (We think it was actually caused by git.)
Since then I've not been able to commit any changes to the repository, while others can. I can no longer commit changes to the files I was committing when the server crashed, however I can commit changes to other files.
I've tried creating a fresh directory and cloning into it. As well as a git stash
, git pull --rebase
, git stash apply
.
No matter what, the server is returning an error when I now try to commit the files I was committing when the server blue screened:
$ git push -v
Pushing to http://bjury1@server:7990/scm/project.get
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 745 bytes | 0 bytes/s, done.
Total 7 (delta 6), reused 0 (delta 0)
POST git-receive-pack (881 bytes)
To http://bjury1@server:7990/scm/project.get
! [remote rejected] master -> master (missing necessary objects)
error: failed to push some refs to 'http://bjury1@server:7990/scm/project.get'
I can commit test changes like adding and removing a file.
I'm not too sure how git is installed here, I do know we have (very old versions of) Stash and Jira and somehow it is built into those. The problem is if the server is borked for me, I'm not even sure how to go about fixing it!
Is there anyway to reset or query the status of a specific file on the server?
Any suggestions gratefully received!
Edit:
It's worth mentioning I normally use GitHub for Windows to commit changes, and only drop to the shell when there are issues. Coincidentally to our server blue screen there was an upgrade to this app.
Edit 2:
I think its unrelated to GitHub for Windows, I recreated the repository and could commit a test change (add and remove a file) from both the git 'console' and the GitHub app.
However, when I try to commit a change to the two files I was committing when the server blew up I get the error above. So the issue is something to do with these specific files on the server.