• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't commit to git repo from Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't commit to git repo from Xcode


  • Subject: Re: Can't commit to git repo from Xcode
  • From: Lorenzo Thurman <email@hidden>
  • Date: Sat, 12 Jan 2013 22:52:32 -0600

I think I finally have a handle on this. I found that if I move my project folder to the Desktop, I can commit without error. The original locaton is where all my projects are located, most of which are Subversion projects. I guess there is a conflict with Subversion somewhere. If I find the answer, I'll post it for posterity. In the mean time, I'll just keep git projects separate from the Subversion ones.
Thanks all for the help.

On Jan 12, 2013, at 3:49 PM, Lorenzo Thurman <email@hidden> wrote:

I tried this and got the same result, but this command failed when I tried it:

git add -a -m "Added missing file"
Looking at the options presented by git, I substituted:
git add -A myfile.m
I hope this is the same as what was intended by your suggestion. I any case, I get the same result from Xcode after doing everything else.
x
On Jan 11, 2013, at 11:19 PM, Cody Garvin <email@hidden> wrote:

From the command line, make sure you're on a branch. There are some git issues where it can put you on "no branch".

$ git branch
(master should be selected if you aren't branched)

$ git add -a -m "Added missing file"
(do this to make sure you're adding everything)

$ git pull origin master <--- or whatever your branch name is
(do this to make sure you're up to date)

$ git push origin master <--- or whatever your branch name is
(do this to make sure you're completely synced)

If none of that works, I'd suspect the file is actually a case issue. I've ran into that before where Xcode sees it as non case sensitive, but git treats it as case sensitive. Try renaming it to something entirely different. 

When you removed the file from git, did you remove it from Xcode too? Xcode may have kept the "bad case" in the project resources, and that may be what is screwing it up. 

It wouldn't hurt to do a:
$ grep -Rni "myfile.h"
(look for any instances in your xproj that may point to bad case

- Cody

Cody Garvin | Lead Developer
Servalsoft LLC
503.998.2443
www.servalsoft.com



On Jan 11, 2013, at 9:02 PM, Lorenzo Thurman <email@hidden> wrote:

Thanks for the tip, but I get the same error in Xcode.

On Jan 11, 2013, at 10:55 PM, Naldi Kusuma <email@hidden> wrote:

Have you tried:
1. Copy myfile to some other folder first
2. Do git rm myfile
3. Commit
4. Put myfile back to where it was
5. Git add myfile
6. Commit

Pretty much try to remove myfile completely from the project, and re-add it again?

Good luck,
Nalditya Kusuma

On Friday, January 11, 2013, Lorenzo Thurman wrote:

From within Xcode, I get this message when trying to commit changes to git:
"The operation could not be performed because the file is not under version control."

If I go to the command line and try the commit, git says:

# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   myfile.m
#
Ok, it should be under version control, since I cloned the project from its repo. But I'll bite, so from the Command Line, I did a 'git add myfile.m' (that option is grayed out in Xcode). Now, I can commit the file from the CL. If I make a change to the same file and try to commit from Xcode again, I get the "...file is not under version control" error again. So now I go back to the CL, 'add' the file again, try to commit the file from Xcode and get the same error again, but, I can commit from the CL.

I migrated this project from a Subversion repo, using 'svn export', so there are no .svn directories to confuse Xcode, or git, for that matter. I even did a 'find . -name .svn' from the CL to confirm that they did not exist within the project.  I mention that, because I found a post at cocoa builder where a user with the same problem found a stray .svn folder in his project. I tried a 'git add *' just to make sure any missing files would be added, but I continue to get the error when committing from within Xcode.
Anybody know what the problem might be?
Thanks

Lorenzo Thurman
email@hidden




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

"Yes Virginia, there is a Chaminade"
--unknown

Lorenzo Thurman
email@hidden



Give a man a fish, and he'll eat for a day. Give a fish a man, and he'll eat for weeks!
  - Takayuki Ikkaku, Arisa Hosaka and Toshihiro Kawabata

Lorenzo Thurman
email@hidden





"The meek shall inherit the earth...but not the mineral rights"
-Jean Paul Getty

Lorenzo Thurman
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Can't commit to git repo from Xcode (From: Lorenzo Thurman <email@hidden>)
 >Re: Can't commit to git repo from Xcode (From: Lorenzo Thurman <email@hidden>)
 >Re: Can't commit to git repo from Xcode (From: Cody Garvin <email@hidden>)

  • Prev by Date: Re: Can't commit to git repo from Xcode
  • Next by Date: Re: Best location to ask deployment related questions?
  • Previous by thread: Re: Can't commit to git repo from Xcode
  • Next by thread: Re: Can't commit to git repo from Xcode
  • Index(es):
    • Date
    • Thread