0

I made changes to my code and typed:

git status

Which returned

Your branch is up-to-date with 'origin/branch_name'. nothing to commit, working directory clean

Then I typed

git diff

Which didn't print out anything...

Can someone help? It should be showing me files that were changed...

Thanks in advance!

4
  • Maybe your changes are in the exclusion ? your .gitignore file ? Commented Apr 28, 2016 at 19:14
  • 1
    ... did you save the files? Commented Apr 28, 2016 at 19:16
  • they're not in .gitignore and i did save the files Commented Apr 28, 2016 at 19:16
  • Are you calling git status from the correct working directory? Commented Apr 28, 2016 at 19:17

3 Answers 3

1

Most likely you changed a file listed in .gitignore or .git/info/exclude. See Github's "Ignoring Files" documentation for more information.

Alternatively is it possible you already committed and pushed your changes? Check with git log or gitk (if installed).

Sign up to request clarification or add additional context in comments.

2 Comments

hi - i checked .gitignore and the files i changed are not being ignored.
Check if you committed? git log and maybe gitk (if installed) might help.
0

When you type git status it compare the content of your working directory to the staging area and the staging are to the repository.

In your case all your files are commited so no changes are tracked.


Diff will print out the difference (content) of the changes which status only print summary

2 Comments

can i un-commit somehow?
of course you can. Read all about it here: stackoverflow.com/questions/34519665/…
0

git reset --soft HEAD^ solved the issue... i'm not 100% sure why.

1 Comment

That means you already committed it. And you already pushed it to the remote.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.