GitHub: git status: showing staged > deletions for already-deleted files, want to commit replacmnts
This is a GitHub question, so please forgive me if I'm not supposed to ask about Git Hub here..
I have a pre-made GH online repo for a react project, called "BuyNow" and it has been connected to my local repo folder such that I'm able to push and pull from it, from in terminal.
I've now finished the project and want to update the repo by pushing to it from terminal.
Its been a while since I've pushed anything and now, when I run 'git status' I first see:
Your branch and 'BuyNow/main' have diverged,
and have 1 and 4 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: ../.gitignore
deleted: ../app.js
deleted: ../package-lock.json
deleted: ../package.json
In my current local folder, I have files by these names (see picture attmt) which I want to keep and not delete locally. Using a 'git pull' here now would result in these local files getting deleted, so I don't want to use that. These files also no longer exist in the online repo either (https://github.com/nnall/BuyNow), I've since gone in and deleted these files from there, thinking that would possibly get rid of this 'changes not staged' message, but it didn't.
How can I deal with these 'changes' it's asking me to commit? Again, just 'committing' would mean deleting the local files, so I don't want to do that. What do I do here?
My repo: https://github.com/nnall/BuyNow
I have a pre-made GH online repo for a react project, called "BuyNow" and it has been connected to my local repo folder such that I'm able to push and pull from it, from in terminal.
I've now finished the project and want to update the repo by pushing to it from terminal.
Its been a while since I've pushed anything and now, when I run 'git status' I first see:
Your branch and 'BuyNow/main' have diverged,
and have 1 and 4 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: ../.gitignore
deleted: ../app.js
deleted: ../package-lock.json
deleted: ../package.json
In my current local folder, I have files by these names (see picture attmt) which I want to keep and not delete locally. Using a 'git pull' here now would result in these local files getting deleted, so I don't want to use that. These files also no longer exist in the online repo either (https://github.com/nnall/BuyNow), I've since gone in and deleted these files from there, thinking that would possibly get rid of this 'changes not staged' message, but it didn't.
How can I deal with these 'changes' it's asking me to commit? Again, just 'committing' would mean deleting the local files, so I don't want to do that. What do I do here?
My repo: https://github.com/nnall/BuyNow

