Whirlwind Whirlwind - 4 years ago 128
Git Question

What Discard all changes in Xcode source control actually does?

As in question, I wonder if there is some documentation about what this Xcode command does (Source Control -> Discard all changes) ?

I guess it reverts to last commit but on local branch ? Can somebody confirm that it doesn't affect the same remote branch automatically ?

Answer Source

I didn't use git in XCode, but I can be so sure that Discard all changes will NOT affect history in the remote.

It will most probably discard all unstaged changes you made to the tracked files in the working directory, simply like executing git checkout -- . from the terminal.

With unstaged, it means changes you once executed git add -u for will not be discarded.

By the way, to find out what it actually does, a test by yourself is needed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download