Do you still have access to the old computer? It seems that .git/
folder (and .gitignore
file if you had one) wasn't copied. They are hidden files so you would need to first locate them. If you have them on your old machine, they should be in the same folder as your code.
Link> How to show hidden files on win10
Once you locate that .git/
folder, copy it to your new folder with the code.
Btw, maybe git add *
is not the best idea. => Explanation
I would suggest:
git status
to first check which files you are adding
git add -A
(if you want to add all of them at once)
git commit -m 'Your git commit message'
git push origin HEAD
(by using HEAD
, you actually push from whichever current branch you are on - no need to type the branch name)
P.S. Note that IF you have been changing/modifying files on your new machine (and in case .git/
wasn't copied indeed), there is nothing which could have tracked all those changes. Thus, there will be nothing to commit.
P.P.S. If you already have recent version of files on GitHub, that can be helpful. I would be glad to help you but please provide more info on what exactly happened, what do you have access to, etc.
Good luck,
N.