Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Updated SSH Keys, first every file had changed, now no files tracked,

RDGInfoSys November 27, 2023

I'm am absolutely stumped regarding what happened/is happening.

I've migrated to a new computer since the last time I pushed changes to the BitBucket remote.  So, I had to generate a new SSH key.  After doing so, every file was being shown as the entire contents being deleted, and then a second instance of the file had all the current lines as new.  I couldn't find a way to force push all the files to the remote.

I figured I'd delete the remote and push the local git archives up to the remote.  Using SOurceTree on macOS, I recreated the remote using "Publish to remote…" and everything seemed to work.  Looking online, it appears that all of the commits are there, but if I view "Source" online, there are no updates since January.

Also, SourceTree has a "1" for files to be committed, but it shows nothing when Commit is clicked.  In addition, when changes are made to the files, the changes are not picked-up by SourceTree as needing to be committed.

1 answer

1 accepted

1 vote
Answer accepted
RDGInfoSys December 6, 2023

Doing a bit of exploration/trial and error.

It seems that none of my files are being tracked any longer.  Oddly, using 'git add <fileName>' or 'git add <directoryName>' does not add the file(s) or the directories.

RDGInfoSys December 7, 2023

FIXED!

Still don't know how this happened, but the fix was:

  1. Check the repository's and global .gitignore files to make sure nothing was being excluded that shouldn't be
  2. In an OS-level terminal session, run in the repository's top-level directory: 
    find ./ -name '.git'
  3. In an OS-level terminal session, remove any .git directories that were not the top-level repository's .git directory
  4. In an OS-level terminal session, run on each of the directories that I wanted to track: 
    git add <<directoryName>>
  5. In SourceTree, commit all the "new" files.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events