I am new to git
. I don't actually use it for any project but just as a storage for all my dotfiles.
I did a git commit
and just after that, I realised that was just unnecessary because it was an incomplete change. So, instead of doing another edit, commit
and push
, I reset the last good commit using git reset --hard #commit_shaN
and pushed it to remote with help from here : Git reset --hard and a remote repository. Remote is fine now but locally when I make new changes and try to do new commits, it says :
On branch master
Your branch is up to date with 'origin/master'.
Untracked files:
blah
blah
blah
blah
blah
blah
nothing added to commit but untracked files present
I searched the web for help and got this : Git:nothing added to commit but untracked files present. As this page says, I added those untracked files to .gitignore
with no result. It still gives the same output. Thanks in advance for your help.