rubymine commit failed with errors - ruby

After pulling from main master, encountering a conflict and resolving conflict.
I'm working in a sub-folder of the main project repo (on automated tests) and so generally don't have to worry about conflicts. It seems however that every time a conflict is encountered and fixed, where I attempt to commit the pulled files RubyMine gives me this error message and won't allow anything to be done to resolve. I've previously taken a new fork from the GitHub main and manually merged in my own lost commits but it's happened again.
I can't find any reference to this dialog on searching the web and our TA has investigated the issue, concluding that it may be a RubyMine bug. I'm continuing my search for relevant info but aside from poring through the bugs in http://youtrack.jetbrains.com/issues/RUBY (which I have now done with no relevant issues found) I can't see where any leads might come from.
Latest version of RM (6.0.3) running on Macbook Pro (Mavericks)
RubyMine was used to resolve the conflicts; git status shows only the pulled files I'm now trying to commit as tracked and uncommitted - I have untracked files managed in a gitignore file
The dialog says:
Commit
Commit failed with errors
With error message displayed in terminal:
Error: Error executing git commit --only -F
[list of files I attempted to commit]

Try like this
Goto Tools -> Open terminal
Use this command
git status
Then add untracked files
git add .
Commit changes like this
git commit -i * -m "commit message"
If you still have errors please post the error. You can see the Version control logs at the bottom of rubymine

Are you using Rubymine to resolve the conflicts? If not, it's possible RubyMine has kept stale state of the filesystem and is reporting the errors because of this.
What does git status . tell you in your working directory? Is your current tree clean, or do you have unmerged changes?

Related

"the Package.resolved file is most likely severely out-of-date and is preventing correct resolution"

I'm getting the following error when trying to build. It shows up as the only item in the build log, too.
Here are the packages I'm using:
For me, it turned out that, even though Xcode was able to resolve and clone these packages, it didn't like that 2 of them pointed to the GitHub repo page, rather than the git file version.
Changing them so they're all .git URLs fixed it:

How do I fix the 'Could not reset index file to revision 'HEAD'' problem in Xcode?

I am trying to start my Xcode and I receive a warning that says: '“Project” is currently in conflict. Do you want to abort the current operation?' I press abort and I get this error:
Could not reset index file to revision 'HEAD'.'
I have been unable to pull from repositories and unable to checkout other branches. I tried to fix this by using the terminal but it did not work.
I've got the same message during I wanted to abort an ongoing merge(messed up something during merge conflicts). I assume that XCode tried to refresh your branch automatically or something in that direction.
So, I tried:
git merge --abort
which gave me the same error message:
error: Entry 'some/package/Broken.java' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'HEAD'.
I openend 'git gui' and unstaged the automatic staged classes. After this an abort worked with:
git merge --abort
This was done on git bash console.
Looks like more of a git conflict issue. You can undo a git merge with conflicts doing
git merge --abort
Hope that helps!

The working copy <Project name> failed to commit files. - The repository has an uncompleted operation

I've just updated my Xcode from 6 to 7 (and code from Swift 1.2 to Swift 2.0) and try to create new branch in Xcode. After that I can't push my code to Bitbucket.
Is there a way how can I delete repository from directory and setup Bitbucket again and maybe push to another (a new one) repository? Fix of this problem will be great, but I will be satisfied even with move to another repository.
I had this error in xcode 7.1 on a year old project that was working fine. In my case I have a project with the default local repository created by xcode. For anyone who is not going to re-install and re-setup. It is possible to find out what the dangling command is and fix it from command line.
To find the dangling command Open Terminal from the project directory:
xcrun git status
In my case the status returned:
On branch master
You are currently rebasing.
(all conflicts fixed: run "git rebase --continue")
To fix the problem I used:
xcrun git rebase --skip
In my case I ran git status which revealed that You are currently bisecting. (I was doing a bisect and must had forgotten to reset). I did a git bisect reset and attached the head to my latest commit and it was all fine afterwards.
When I am merging from currentBranchA into branchB, I got conflicts,I didn't want to solve the conflicts immediately and quit the merging process. But when I try to merge again, the Xcode shows "The working copy is currently in the middle of another operation..."
I opened the terminal ,cd to the project directory, and check the git status:
git status
it shows:
On branch currentBranchA
Your branch is up to date with 'origin/currentBranchA'.
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Just do it as it says. Continue to input
git commit and click Ctrl + C to close the commit message window.
The problem will be zero.
The problem was with installation of GitHub. I had a master repository. After reinstall and resetup everything works like before.
EDIT: For anyone who has a problem with Xcode and GIT I have a best advice. Don't use it. Use for example Source Tree
When you start developing for a living, you are gonna have to use more reliable solution for GIT. Imagine you have 70 branches. Using Source Tree you can easily solve conflicts and other things about working in team. Xcode GIT solution is not reliable and you are gonna be only frustrated.

Why doesn't source control check in my CocoaPods?

I have a few Cocoapods installed for my project. For one particular pod, KVNProgress, Xcode doesn't commit it to GitHub. Each time I check my project out I get 'can't find KVNProgress.h' blah blah...
So I run 'pod update' from terminal and immediately all is fixed.
After running 'pod update', I check my project navigator and there are no 'A' or 'M' or anything else for that matter indicated a new or modified file. Therefor nothing to commit.
Any ideas how to fix this so I don't have to update the pods each time I check out the project?
You should use the Terminal to figure out if it's an Xcode problem or a git problem.
Run git status --ignored in the project directory. If the Pods directory is shown in the Ignored files section you have to remove Pods from your .gitignore file.
If the files appear in the untracked files section Xcode messed up the git status.
You can use git add . to add all untracked files.
As a side note, I would recommend to use a dedicated git client like SourceTree, GitHub Mac, or Tower instead of Xcode. Xcodes git implementation is not the best (feature wise) and it's a bit buggy.

Can't Push to Git Repository

I am trying to push my recent commits to a Git repository that I have set up on Bitbucket, and for some reason it never pushes.
Xcode just gets stuck on the screen saying "Pushing Changes..." and "Preparing to Push Changes..." but it never completes. Then ends with "The working copy of 'Master' is currently up to date."
But it's not.
I have made changes.
Also tried adding more commits, but that didn't work either.
Any suggestions?
Git doesn't always work with Xcode, usually because of the crap files Xcode generates (eg xcworkspace etc), and it's pretty buggy in general, so I would just try pushing from the command line instead of through Xcode (which should also give you a more detailed error message if it doesn't work).
Try doing a git add and then git commit

Resources