About GIT command DIFF

Learning Challenge

Git

Question

I was wondering if its a setting or what but I followed the git instruction from out learning modules. When I tried using the command “git diff” while I was doing the assessment for git I got nothing… it accepted the command but just did not display anything. I went to each branch and commit see if that was the problem, but nothing… I even tried in visual studios and nothing… git diff command- it just so useful- able to see what occurred and I would it like to be working.

What I’ve tried

I removed git and redownloaded it
----------------------------------------------

git add -A
git reset
```------------------------------------
# sets less as default pager
git config --global core.pager 'less'
# tells Git to ignore file modes
git config core.fileMode false

### Screenshots

That typically means you don’t have any changes in your repository. If you go in to one of your files and just add some random characters in, save it, and then run git diff… you should see the random characters that you typed in.

Hope that helps! :+1:

I thought so too Bryan, but I was running this command during my assessment and yielded no results just took the command and no output. I passed the assessment so I know I had changes in my repo at that time.

1 Like

That’s super weird. :thinking:

I’m glad you passed the assessment though! Let us know if there is anything else you need! :tada: :confetti_ball: :partying_face: :raised_hands: