Reputation: 2058
I have been having a lot of trouble setting up a local git repository on a project of mine. I have created a completely new project and dragged all the files into it, making sure that I checked of the git/version control tick.
Now I have the repository (with the file system pointing back to the proper location) visible in the organizer, and can use the buttons Pull
and Commit
all in the organizer:
But when I make any changes in the actual project, no source control badges show up i.e. M
, A
, etc. even when changes are made. And when I try to push (or do anything) it says that there are no remotes (there are remotes...):
It seems almost like the project is somehow not actually attached to the repository...
EDIT: git status
in terminal
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
# (use "git push" to publish your local commits)
#
# 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: CrunchCalculator-1-2.xcodeproj/project.xcworkspace/xcuserdata/Neil.xcuserdatad/UserInterfaceState.xcuserstate
# modified: CrunchCalculator-1-2/ViewController.h
#
no changes added to commit (use "git add" and/or "git commit -a")
Upvotes: 1
Views: 1639
Reputation: 2058
After hours restarting, testing, and searching for solutions... turns out all you had to do was change the name of the Project. By clicking on the main project folder (blue) and hitting enter, then change the name to something else, this solved the problem.
Changing the name of the project!
Upvotes: 1
Reputation: 1494
Instead of using the XCode for GIT use Command line.
This link give you a the usage of various GIT commands git
Upvotes: 0