I would like git to track a file, site.db
, that is currently not tracked because I ran git rm --cached site.db
Since running that command I have made a few changes to the file and I would like to push it to a remote repository.
How can I do this?
When I run git status
, it returns:
git status
On branch master
Your branch and 'origin/master' have diverged,
and have 52 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
deleted: denise/site.db```
I'm worried that if I `push` then `denise/site.db` will be deleted, when I actually want to push it!
CodePudding user response:
If you do git add of that file it should readd it