before i was able to 'commit & sync' (button) my new changes from my local repo to remote. Now i have 2 new commits but i only see Commit to Develop. Is there something wrong?
The "Commit and Sync" button is activated from the Edit menu, by checking the "Automatically Sync after Committing" entry.
This option is only available on Mac OSX.
Related
Right-Click on Cloned Git folder
Select "TortoiseGit"-->"Check for modifications"
Screen comes up showing my changes but screen has no "Check Repository" (or "Check Origin/Master") button
In TortoiseSVN I used this feature ALL THE TIME to see if I needed to do an "SVN Update" prior to doing an "SVN Commit". How can I see if there were any other changes done to the REMOTE since my clone (i.e. do I need to do a GIT PULL before I do my Commit+Push).
pushing to github was working fine. I think this problem started when i checked out a branch from github. How do i fix this? When i try to push to github now, i get the error "The current branch could not be determined."
Also, all my local commits do not show up with comments in either of my local branches. at least not in xcode 9 UI. I don't really know how to use the local git to check these things, so if someone wants to point me to documentation that would be helpful too.
I had this issue, you need to get down and dirty in Terminal :)
The issue is most likely a detached HEAD
This recovery is based on you have made changes whilst head detached and you want to keep these changes.
Navigate to your project directory and execute: git status
If you have a HEAD detached message then:
Commit changes: git commit -a -m "you commit comment here"
Create a local temp branch: git branch temp
Check out the previous branch (the branch you want to use i.e. master): git checkout master
now merge your recent changes (from the temp branch): git merge temp
Your all done, go back into Xcode and your back on your branch and everything as you left it :)
Hope this helps.
Type these commands (1-4) sequentially in your Command Prompt :
git commit -a -m "you commit message here"
git branch temporary
git checkout master
git merge temporary
Now head over to source control navigator pane in your Xcode project and delete the "temporary" branch from Branches Tab
Source Control navigator pane image
I had the same issue after checking out a previous commit and have found a fix.
In Xcode go to Source Control > Clone > Clone the repository you are trying to push and save it, then delete your old Xcode project and replace it with the cloned project and it should work as normal.
I've just updated to Xcode 7 general release and ive tried committing files. Its failing however, and im getting the following message;
Ive seen this question but the secondary response is different in the OP question: Xcode and Git Source Control : “The working copy XXXXX failed to commit files”
Whats the 'helper application' that it is looking for and whats the solution? Migrating to Xcode 7 and iOS9 is becoming a headache :(
I commit my files by going to 'Source Control' -> 'Commit'
Turns out the “helper application” is in fact Git. For some reason Xcode 7 is eager to associate you (the committer) with a name and an email address.
To fix it, on the command line, type the following:
xcrun git config --global user.email you#yourdomain.com
xcrun git config --global user.name "Your Name Here"
If the above mentioned solutions don't work, try this one:
Add changes once with a git command. Use terminal and change to your working directory (that contains a /.git folder) and execute:
git commit -a -m "Commit title here"
After that commit via Xcode should work again.
I had the same problem.
This fixed my problem: Quit Xcode(using CMD+Q) & run it again.
The above solution did not work for me. I am running on Xcode 8 (8C1002) and I have close to 4500 files to commit at once (adding the sources of a library to my project).
The only way I can make it working (without the error message) is by committing smaller number of files multiple times instead of all at once.
This happens to me when I add new image assets.
The "fix" is to go to File > Save BEFORE you do a Git Commit.
Then the Commit works Fine.
first you check in command line follow this picture .If git is clean (add . + commit done)
also have problem same you ForceQuit Xcode and open again
Post-installation of 10.8 and Xcode 4.4 when I try to push to a remote using the Xcode integration Xcode is telling me 'no remotes found'. I am still able to push successfully via command line so my actual repositories are fine. I've installed the command line tools and have tried restarting Xcode several times. Additionally, if I go to Organizer and try to select the repository all I get is a spinning activity indicator. If I select 'remotes' for a given repository it's blank. Note that Xcode does recognize git is available though as it does show which files are modified and allows commits. Reported system git version in /usr/bin/ is:
git version 1.7.9.6 (Apple Git-31.1)
Is anyone else experiencing this, or do you have any suggestions for a remedy (or at least a place to look at a log to see what is going wrong)?
UPDATE 10/18/13
This issue has been resolved in Xcode 5.
When you add the remote repository in Xcode or in command line (doesn't matter from where you add it) make sure that you use the full path for your repository.
E.g.:
From commandline it's enough to specify
git remote add <name> gituser#gitserver:example.git
when your example.git is located in gituser's home directory. However Xcode can't deal with this annotation and says "No remotes found" when you try pushing your commits to this remote repository.
In order to satisfy Xcode you should type the whole path like:
git remote add <name> gituser#gitserver:/home/gituser/example.git
I have found this solution for Xcode with Git:
Organizer > remotes > origin
1) remove old remote
2) add new remote:
remote name: origin
location: same as before, but replace all ":/" or "//" by "/" only
I had the same problem with Xcode 4.6.3.
Here are the steps I performed to resolve the problem:
1. In Xcode I went to File -> Source Control -> Repositories (which opens the Organizer)
2. I then selected the Remotes object from the tree for the Repository I was having the problem with.
3. My remote was named origin, however when expanding it, I noticed it did not have a Branch associated with it.
4. I then selected the remote origin and pressed the Remove Remote option, which removed the remote origin from the view.
5. I then went to a terminal and re-added the remote with:-
`git remote add origin http://username#localhost:7990/scm/iac/main-repository.git`
6. I then needed to add the branch(es) to this remote, which did not worked correctly initially, so I then forced it using the -f command. The command I used was:-
`git push origin master -f`
Note: It may have been possible to skip steps 4 and 5 and just go straight to step 6. I had removed the remote, so did not have the chance to test this.
Note 2: You will need to restart Xcode (or possibly just the Organizer) to see that the remote and branch are now available.
you need first add a remote repository: git remote add yourname https://github.com/user/repo.git
and than push... and xcode find the remote repo and can push too.
I've had the same issue with SSH defined hosts.
My ~/.ssh/config looks like this:
Host myGitServer
HostName {real address goes here}
{Some more config for the host here}
My repository remote URL was in the form of ssh://myGitServer/git/project.git
The problem was that XCode did not read the SSH config to resolve "myGitServer" so the repository was always "offline" for it.
I ended up adding "myGitServer" to /etc/hosts.
I guess that among other things, the "no remotes found" issue is caused when XCode can't directly resolve the name of the GIT remote server.
I had a similar problem where remotes were failing to load, specifically for kiln as the remote host. Looking in the git config for the repository info, the URL had been changed to prepend my email address to it.
So I simply exited Xcode, and then from the command line did:
git remote set-url kiln https://...kiln repo name.git
And that seemed to fix it when I restarted Xcode - both pull & push worked again.
I have no idea why Xcode corrupted the URL. This was with Xcode 4.6.3
1- search and apply the guideline. which is mentioned about "show all hidden files in mac finder". and delete .git directory (this folder wont appear without solving article-1)
2-XCode>Prefences>Accounts>Delete github account and close xcode. than open and reconfigure same github account by adding all over.
3-click the section small icon namely "source control navigation" (which is near the project navigator). as you right click a popup will appear. and choose create blabla on github". actually this steps solved same issue.
Xcode 10.2.1
Double Check:
1) Git Acc under preferences.
2) cmd + 2, right click under remote to create a remote.
I come to you because I have this really annoying issue. In xCode, I deleted some files and now, when I want to push my sources, it says that I can't since there is some uncommitted change. The uncommitted change come from the deleted files (xcode shows me these files marked with a d).
My question is how I make my git repo sync with it so I can push my sources ??
In addition to the answer of triad:
Select your project in the Project Navigator
Select under the File menu->Source Control->Commit
Select under the File menu->Source Control->Push (if you want to push it to a remote repo)
On the Mac it helps to research the items under the menu bar, as the popup menu is not always populated fully.
You need to commit your changes before you push onto your remote. If you go to your project directory, type:
git status
It should show you the files which have been deleted. If it looks okay to you, type:
git commit -a -m "your commit message here"
Then you should be able to push to your remote repo:
git push <remote> <remote_branch>