开发者

Problem with Git Repository in Xcode 4

In my iPhone app, I am using the in-built Git repository of Xcode 4 so that all the team members can work on the same project.

Now the problem is that even after I commit my changes to the repository, It still shows modified (M) 开发者_运维问答symbol in front of the committed file.

What could be wrong?

I want to ensure that once I commit the changes it should not show "M" for that file.

Is there any setting which I have to do to make it work fine?

What can be done?


The built-in Git repository is a local repository only. How do you share that with your team? If you hooked that repository to GitHub, for example, you will experience problems as the implementation is not 100% reliable. I would use the command line in this case and git add/commit/push the changes. There are discussions and tutorials in the GitHub Blog.


Without knowing what you're doing in Xcode, or how you have set up your repository all I can say is that you should check the status of your repository in the command line. Maybe your commit fails for some reason and you're not seeing the message in Xcode.

  • Try git status to see what state your repository is in.
  • Try git add <your files> and then git commit to see if you can actually commit your changes.


Did you stage your files before committing (git add)? Otherwise the commit will do nothing.


You would need to Push the changes in Xcode 4 to remove the "M" or modified status. If you don't have the command line mojo like most people, you can just use the functions built in as they were intended.

It won't solve your issue of sharing as it is only a local repo. I'm finding that even using Xcode 4 with an outside repo, you need to learn some command line stuff or it just isn't going to work, or at the very least kick your butt enough to make you consider giving it up.

*edit Just to make it clear, the process for Xcode 4 is as follows: File-->Source Control-->Commit File-->Source Control-->Push

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜