Somehow the .git folder got deleted from my project folder. My project folder may contain changes which I don't know of. Maybe it can be older than the remote version on GitHub.
Is there a way I can start tracking everything again so that I can run git status to see the changes?
You can create the .git folder in your project folder by :
$ git init
Then you can add and commit all the files you wish :
$ git add .
$ git commit -m 'some comment'
Then you add the remote repository (the exact command depends on your project name in GitHub and your credentials to access it) :
$ git remote add origin git@gitserver:/opt/git/project.git
Now you can do git fetch to get all the branches from the remote version, and decide what to do with them.
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