1

I set up a local git repositories in order to have something a bit more organised than Snapshots. By local, I mean on the same host that XCode is running.

For the time being I am using snapshots as well.

So far as git is concerned the process of committing goes fine and I can see the changes fine but I can't work out how to get an old version back from within XCode4.

What I am asking is, specifically.

If your git is on the same local host as the running version of XCode, how do you revert to an earlier version of your programme from within XCode using your git repository.

nerak99
  • 640
  • 8
  • 26
  • http://stackoverflow.com/questions/4114095/git-revert-to-previous-commit-how I think you need to research on your own a little more, this is one of the most asked question and answer to this can be found very easily I suppose. – ro ko Sep 06 '12 at 10:27
  • Well if it is so common, how come searching on git pull from local returns answers almost exclusively posed about remote repositories? I have been trying to do this for several days. Maybe you could have included a link to one of these really common answers. – nerak99 Sep 06 '12 at 10:33
  • Could you be more specific with your question, did you check out the link that I posted ? By old version do you mean revert to older commit or do you want to revert just the local changes that you have done after your last commit ? – ro ko Sep 06 '12 at 10:36
  • Yes, and it did not answer my question. I generally give questioners cxredit for having done some research even though I may be such an expert on the topic in question that I am surprised! – nerak99 Sep 06 '12 at 10:40
  • I am not sure what you are really trying to say and what your answer has really pointed out, you weren't being specific with your question. I saw the answer you posted and if you're trying to point out the accepted answer then all the commands shown there is visible in the link that I posted above and is very common. I do not know what this really means either "I generally give questioners cxredit for having done some research even though I may be such an expert on the topic in question that I am surprised!" I am sorry If I misjudged your question but I doubt that I was wrong. – ro ko Sep 06 '12 at 10:48
  • Regardless of whether criticising questions is a facility on a site, there is no such thing as a bad question. Furthermore, voting down someone rep is a sad mixture of bullying and trolling. – nerak99 Sep 06 '12 at 12:33
  • Voting down cannot be considered as bad, If someone votes me down, I generally try to know about the reason so that I would not make the same mistake again, just like when my teacher considers that my answer is wrong and deducts my totals. It's really upto you how you take it. I might be equally wrong, for down voting and I would love to hear from some one that my opinion was wrong, I am sorry if you take it that way. – ro ko Sep 06 '12 at 12:52
  • @nerak99 there is. Check out http://meta.stackexchange.com/a/67975/181090 for reasons why some questions are just plain bad. The thread also contains (links to) advice how to actually ask good questions. And of course, please see http://stackoverflow.com/questions/how-to-ask – eis Sep 06 '12 at 13:09
  • Thanks eis, I am content that I was at fault because I left mentioning XCode4 out of my question. I have put it in there now. So far as the downvote is concerned, the question was not badly researched, which is what a downvote is for, not for disagreeing with a comment which is why it was downvoted. – nerak99 Sep 06 '12 at 13:27
  • @nerak99 Your question looks a lot more clear after the edit. You shouldn't really take all the down votes as a bully or trolling. My first comment did look relevant for the question before edit since you didn't mention about xcode, sorry if I misunderstood your question, reputation backed up :) – ro ko Sep 06 '12 at 14:47
  • Reworded again to make thing crystal clear for Messrs Abizern, William Pursell, CharlesB, Eric Brown and Damien Black. – nerak99 Oct 05 '16 at 08:05

2 Answers2

1

The answer to my own question (Thanks Fkz) is that it appears that within XCode4 you can't actually pull previous commits back. In summary, Xcode allows you to commit changes but not revert, however you can revert to the last saved version using a file menu entry.

I thought that this was what git would let me do from within XCode4.

Apparently I have to recover old commits from outside XCode4 using standard git commands.

This post is helpful

Xcode 4 git integration

Community
  • 1
  • 1
nerak99
  • 640
  • 8
  • 26
0

Could you be more specific with your question, check this ? By old version do you mean revert to older commit or do you want to revert just the local changes that you have done after your last commit or simply reset check this ?

Community
  • 1
  • 1
ro ko
  • 2,906
  • 3
  • 37
  • 58
  • By old version of my program I mean in the same sense as I was using Snapshot. To recover an old version. Git is a more sophisticated version control system and add more possibilities than merely saving old versions. I am afraid I can't put it mpre simply than that. I found the answer after someone on XChat pointed me to a helpful post. – nerak99 Sep 06 '12 at 12:19
  • To add something, tagging with XCode4 was clearly insufficient to point out that I was using XCode4 – nerak99 Sep 06 '12 at 12:28
  • Also, the link in my previous post helps to answer my question and also makes my question even more clear if that is necessary. – nerak99 Oct 05 '16 at 08:07