6 Git Diff 55%


#1

Can't get #3 part of this...... I've been trying for days.... HELP

Add the changes to the staging area in Git. Recall that you will need to identify the file by its name.


#2

What do I type into the right side for answer to #3. ?


#3

Is Staging area the one on the far right? HELP


#5

I get this error when typing git add scene-1.txt

Did you remember to type the word "git", the command name and the filename?


#6

This is what the right hand side looks like

$ git diff scene-1.txt
diff --git a/scene-1.txt b/scene-1.txt
index c33ce4c..e8a4fca 100644
--- a/scene-1.txt
+++ b/scene-1.txt
@@ -1 +1,3 @@
Harry Programmer and the Sorcerer’s Code
+git add scene-1.txt Dumblediff: I should
+git add scene-1.txt
\ No newline at end of file
$


#7

this is what the left hand side looks like

Harry Programmer and the Sorcerer’s Code: Scene 1
git add scene-1.txt Dumblediff: I should've known you would be here, Professor McGonagit.


#8

You don't need to type git add scene-1.txt in the second row it will cause error :astonished:


#9

Can you copy your code? I can't get past #3..... I didn't add git add scene-1.txt in the second row
It added it when I hit q


#10

The left part:

Harry Programmer and the Sorcerer’s Code: Scene 1
Dumblediff: I should've known you would be here, Professor McGonagit.

The right part:

$ git diff

$ git add scene-1.txt


#11

One more question I hope..... How do I get down to the $ git add scene-1.txt after $ git diff.... It will not let me scroll down... You have been great...


#12

On the right part
After I type git diff, how do I get to the next line to type git add scene-1.txt


#13

just enter q to exit the git diff mode, I think you have done it before~

\ No newline at end of file
$

If you see this, that means you're already in the terminal


#14

Do I enter q right after git diff and then enter


#15

Yes ! just do it ~ then you can enter the terminal


#16

After typing git diff then q enter this is what I get......

fatal: ambiguous argument 'scene-1.txtq': unknown revision or pat
h not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
$


#17

I think you misunderstand the meaning...lol

on the right part(the terminal)

first you need to type

$ git diff (the $sign is given by terminal)

then you will see something like that(the correct)

$ git diff
diff --git a/scene-1.txt b/scene-1.txt
index c33ce4c..1e73963 100644
--- a/scene-1.txt
+++ b/scene-1.txt
@@ -1 +1,2 @@
Harry Programmer and the Sorcerer’s Code: Scene 1
+Dumblediff: I should've known you would be here, Profe
\ No newline at end of file
(END)

instead of that ( the error and the thing which you typed before)

$ git diff scene-1.txt
diff --git a/scene-1.txt b/scene-1.txt
index c33ce4c..e8a4fca 100644
--- a/scene-1.txt
+++ b/scene-1.txt
@@ -1 +1,3 @@
Harry Programmer and the Sorcerer’s Code
+git add scene-1.txt Dumblediff: I should
+git add scene-1.txt
\ No newline at end of file

Beware of the little difference, and looking carefully.

but you are still in the git diff mode , so you must press q to exit the git diff mode


#18

Thanks so much for your help.... I finally got through the entire Git program last night, thanks to you !


#19

:grinning: :kissing: :sunglasses:


#20

I did exactly that for the left part (step 1, lesson 6/9) but still got an error. Can't get past step 1 of this lesson. Anyone knows what's wrong?


#21

A post was split to a new topic: About lesson 6 / part 2 what should i do?