Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

patent10021

macrumors 68040
Original poster
Apr 23, 2004
3,552
834
I only have one problem with Git and that is when I'm modifying a file on GitHub then trying to pull those changes in Xcode Source Control.

For example, I edit a README.md and commit it on GitHub.com. In Xcode I then obviously want to pull those changes so they will be reflected in my local repo i.e. I want my local README.md to inherit those new changes.

But every time I modify something on GitHub.com then try to pull those changes in Xcode, I get a "you have uncommitted changes, try committing then pulling" error message.

So I commit and push and sometimes end up with a branch problem (even though I'm on the same branch) or I'll have to go into the GitHub Mac app and make a commit with the same changes but using a different comment then sync then go back into Xcode and I can then make the pull.

It's very very strange. What am I doing wrong?
 
Learn to love git stash. It's for those times when you want your workspace to be clean but you're not ready to commit some changes. Unfortunately Xcode doesn't support stash directly; you need to use it from the Terminal.

git help stash
 
Learn to love git stash. It's for those times when you want your workspace to be clean but you're not ready to commit some changes. Unfortunately Xcode doesn't support stash directly; you need to use it from the Terminal.

git help stash
"
The command saves your local modifications away and reverts the working directory to match the HEAD commit."

HEAD cause problems with branches so this should be useful. Will check it out. Thanks
 
Funny. I was just having my own little wrestle with Git. I suggest using GitHub Desktop - working with GitHub via plain Git can be darn frustrating sometimes.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.