Using Obsidian Git, I inadvertently tried to push a > 600mb attachment folder (along with usual changes of some “.md” files that needed to be backed-up). It would have taken forever so I just killed the process while Obsidian Git was pushing (probably worst idea ever).
Then, on Github, I added a .gitignore file with the path of attachment folder to be excluded and pulled the changes to my local repo using command line.
Now, how can I properly exclude this “attachment” folder since it was already committed to my local repo ?
I was thinking of something like git rm ATTACHMENT_PATH, but wouldn’t Obsidian Git try to add back this folder each times it tries to push ? Will the .gitignore file prevent this after the git rm ?
Thank you. Well, after doing this procedure and trying to push, even if a diff does not show the files of the attachment folder, for an unknown reason it still tries to push them…
I think it’s due to the fact that attachment folder was not added in the latest commit but in earlier commit, thus those need to be cleaned too ? Not sure yet how to proceed.
Unfortunately, I typed too many Github command that I don’t master enough, and at some points it became a mess so that it was much easier to start repo from scratch.