3

EDIT: Thanks @RobMac - XCode restart did solved it. Good luck for all


Looks like a bug...

I Have two files in Xcode that marked in the source control with question mark (so it's untracked files)

When I do git status i get:

On branch develop Your branch is up-to-date with 'origin/develop'. Untracked files: (use "git add ..." to include in what will be committed)

Podfile.lock

Pods/

The files are not listed.

I try to workaround in Xcode by right click and "Add "FileName.swift"" Or to commit them in the commit window. Both do NOTHING!!

When I look at the repo in BitBucket I see the files in their last revision... So It's great... The problem is only the files status in Xcode

How can I overcome this?

Thanks!

2
  • Xcode has its own .gitignore and git config check it to see it content. There might be something for those files Commented Mar 20, 2017 at 9:38
  • 1
    @CodeWizrad but I committed them with Xcode and it worked.. it's just their status that wrong! Commented Mar 20, 2017 at 9:41

2 Answers 2

5

Late answer, but I had this happen to me. This is what I tried without success:

  1. Closed existing project, not Xcode
  2. Made changes on the command line (moved/deleted files)
  3. Used GIT on the command line
  4. Opened up existing project
  5. Everything messed up
  6. List item

I fixed it by completely closing out of Xcode and then opening up project again.

Sign up to request clarification or add additional context in comments.

4 Comments

Thx, but I tried this, it didn’t solve my problem. And the problem is gone now so I can’t check it out.
It HAPPENED AGAIN!! Thanks - you resolved my issue - nothing worked except your solution!! =]
I fixed it by closing the Xcode project/workspace, then issue git status.
Stupid Xcode! If I don't need to check the switch of creating initial git repo when creating new project, I'll turn off the feature completely.
2

did you check ls -al?

checkout how many .git directories exist

if you have mistake you did git init more than you expect because of xocde

7 Comments

I have only one .git folder, I never did git init manually.. My project is not new.. it's very old.. The problem is very new
i know, but sometime you did not CLI git init you only generate new folder it has been executed
can I do anything to track the problem?
just input cli git status every folder you generated
or find out have you any .gitignore what you didn't generate if we wanna use some kind of IDE. we have to know about it very exactly
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.