1

Doing git status returnsnothing to commit, working tree clean but Netbeans project/files sidebar indicates folders and files Contains add/modified or deleted files which means Netbeans thinks there are files in the folder that are not commited.

Any ideas how to "sync" git status with Netbeans?

5
  • Please, update your question with more information: [1] Which version(s) of NetBeans? JDK? [2] Wich version of CLI Git? [3] Also if you can provide the output of git log from CLI Git and Git History from NetBeans (right-click on the project -> git -> show history -> Search). [4] If you can describe what actions have you done before the issue happend?
    – Dmitry.M
    Commented Mar 18, 2020 at 10:49
  • @Dmitry.M I am using latest Netbeans/Git. Basically no matter where I look in Netbeans, it doesn't match with Git. This happened to me before and I'm just using NB normally. The only solution so far is to delete the project altogether, start a new blank slate then git pull. But I don't want to do that again in the future in case it happens happen.
    – IMB
    Commented Mar 18, 2020 at 13:15
  • this could be a bug
    – Dmitry.M
    Commented Mar 18, 2020 at 13:36
  • @Dmitry.M Yeah, it looks like it. That's similar to what I'm experiencing.
    – IMB
    Commented Mar 18, 2020 at 13:49
  • updated the answer.
    – Dmitry.M
    Commented Mar 18, 2020 at 17:36

1 Answer 1

1

NetBeans 11.3 or 11.2

It could be a bug. It was introduced in NetBeans 11.3 or 11.2 when implementing this improvement (updating jgit to 5.5.0). There is a pull request and probably it will be merged either in 12.0 or 12.1.

Other versions

Sometimes for a big project, NetBeans doesn't automatically refresh statuses. For me manually asking for status refreshing usually helps.

For refreshing go to the file or project or the parent folder, right-click on the mouse -> git -> show changes -> and click refresh statuses.

enter image description here

5
  • @IMB, does NetBeans show any modified, added or deleted files in "Show Changes" window? Please, try checking status with "Changes Between HEAD and working tree" option.
    – Dmitry.M
    Commented Mar 17, 2020 at 19:19
  • Yes it does show files in the "Changes Between HEAD and working tree" option but all the files listed there are already committed in the git status of the "official" Git CLI.
    – IMB
    Commented Mar 17, 2020 at 19:41
  • What is the version of NetBeans? Assuming that official client is correct it could be a bug. I would suggest clearing the cache.
    – Dmitry.M
    Commented Mar 17, 2020 at 19:54
  • I'm using the latest, 11.3. I tried that link, clearing cache, didn't work sorry.
    – IMB
    Commented Mar 17, 2020 at 20:09
  • After some musings, it may not actually be Netbeans fault? I found that Git could not detect a case change in the filename, e.g., Renaming Foo.txt to foo.txt doesn't reflect in git status. Is there any setting in git that affects this?
    – IMB
    Commented Mar 18, 2020 at 18:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.