I accidentally clicked on SourceControl -> Refresh File Status on Xcode , now no files are showing changes on Commit . but my changes on Code is available in local working copy . I am not able to commit those changes to my branch .
I there any way to compare the local changes to remote branch and get the changes status back ?
Please help me .
i have tried following commands but didn't work for me .
git pull
and
git status
CodePudding user response:
If no files are showing changes in the project navigator, and you are unable to commit, the implication is that you have committed everything that needs committing, which is good.
If the question is that you wish you had not committed, then you can say
git reset @~1
That will roll back your status, but not your code, and so your files will get "M" marks again. If you prefer to have it look just like the remote branch (i.e. the last time you pushed), say instead
git reset origin/myBranch
where myBranch
is the name of the branch you are on.