Git diff isn't working I dont know what to do!


#1

this is my code:

$ git diff scene-1.txt Dumblediff: I should've known
you would be here, Professor McGonagit.

what am I doing wrong?


#2

Well, what are you trying to do with that line? It doesn't really make any sense at all.


#3

i am trying to add the file to the staging area


#4

The command for that is "git add filename". "git diff" is used to find the differences in different versions of your project/files.


#5

but how do you add the additional text?


#6

this is my code
$ git add scene-1.txt Dumblediff: I should've known y
ou would be here, Professer McGonagit.


#7

You shouldn't write the additional text anywhere in the terminal. You add the text in the text editor, save the file and after that you write $ git add scene-1.txt


#8

thank you sooo much it finally worked!!! :slightly_smiling: