How do I expand the changes to view it normally after updating project from Git?

Viewed 19

So me and my class mates have recently started using Github to update our project in IntelliJ and it's going great, except I have this really annoying thing where all of the changes are collapsed when I go to the changed class and I can't expand them the usual way.

https://gyazo.com/06e77193750ce9a48cca14bfaa00cd54 This is all I can actually see, but there are 40 lines of code inside the class and 6 lines of imports above the class header, but I can't actually expand the changes to view them like I would in normal code, instead it gives me a pop-up type menu with no option to accept the changes.

Please can someone point me in the right direction? It's driving me insane.

1 Answers

Idea is marking deleted segments (lines) in your code with these grey triangles. It means you have somehow removed these lines (probably unintentionally), and these deletions are now in your working copy (waiting to be commited). You can undo this by selecting Git / Uncommited Changes / Rollback... menu in Idea. It will display a dialog with the changed files you can rollback to the last commited state. You can also right click on each file and select Show Diff to see the changed lines. Be sure not to rollback any changes done intentionally.

Alternatively you can also rollback the changes one-by-one by clicking the grey triangles and pressing the rollback button:

rollback deleted segment

Related