Table of Contents
This chapter will show you how to work with EGit and Gerrit in the most common cases. This includes testing the code of someone else, making your first change, editing your change after having received review, updating your change to apply against the latest version of Saros. This will conclude with more advanced usage of having a chain of changes that build on top of each other and being asked to modify a change that is in the middle. This does not replace taking a look at the rather lengthy Eclipse EGit Wiki.
You might have created new classes and they are not under version version control yet and now you would like to switch the branch. Files not under version control will not be removed when switching branches. In some cases this might not be what you want and you could create a work in progress commit with the new files and later amend the commit with more changes and a better Git commit message. The other option is to remove files and this is what will be handled now.
The easiest way to revert your un-comitted modifications is to use the Git reset feature. You want to use the hard option. This will reset the last commit of your history to the selected commit and will modify your working directory to match this commit.
The Git reset feature does not remove files that are not under version control. The Team Synchronizing perspective will show you files not under version control. You can easily delete these files in this perspective.