I am using Github for Windows to manage several Git repos. For one of a newly cloned repo, it seems that newly created files appear in the 'X files too be committed' list, but after clicking on the Commit
button, a new commit is created but the newly created files are still uncommitted!
I can continue to commit the same files over and over again, creating new commits each time, but the newly created files are simply not committed unless I go to the command prompt and manually do git add .
Is there a setting in Github for Windows that I have missed?
The folder which is giving you fatal: adding files failed message on git add command is actually implying that there is another . git folder inside the folder. If you navigate to the particular folder address, you can remove the file and put git add. It should work.
If you are working on someone else's code or working in a team, it is quite possible that at some point you add a new file to git, but it just won't show up on git status. You won't be able to stage or add it. This generally happens because of one of the rules in some . gitignore file is blocking that file.
Actually I don't think you are missing anything. I just tested this and this is not the default behaviour. Normally after you commit, the files should be flagged as unsynced. When you click Sync
button the committed changes should be pushed to the upstream
.
This is most probably a bug.
Before commit:
After commit :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With