The computer I have been using to maintain my github repository died. I had all the files on it backed up, of course and I copied them to a new system. I am trying to move maintenance to the new system with the same file structure but I am getting errors that I do not understand.
git commit -m ‘2020_10_05’
On branch master
Your branch is up to date with ‘origin/master’.
Changes not staged for commit:
(use “git add/rm …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
…several hundred more files which I do not understand as “modified” since they are identical to the originals except possibly for changed dates.
(use “git add …” to include in what will be committed)
…a lot more files
I tried addressing the “untracked files” by for example: git add Canada/* but they still show up as untracked.
git push -u origin master
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘https://github.com/jcobban/Genealogy.git’
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.
I am afraid to do a git pull/fetch/restore because I do not want to override the versions of the files on my local system with contents from GitHub. Do I have to create a complete backup copy of my local repository, do a git pull/restore to make git happy, and then restore the backup?