So I know variants of this questions have been asked and answered before, so first I want to go through some of my own research to show you that I do not have a duplicate.
The first two are the main reasons I see people having problems with .gitignore files but that is not where I am having a problem. The last one i am 99% sure is also not the problem.
After telling git to ignore my Library and Temp folder, any files from temp and Library still shows up in the GitHub client for windows when preparing to commit: Linked image since Imgur is having problems
Edit: Same issue when viewing the repo in SmartGit
And my .gitignore file
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
/[Ll]ibrary/
sysinfo.txt
*.stackdump
# ============================================= #
# Visual Studio / MonoDevelop / Rider generated #
# ============================================= #
[Ee]xported[Oo]bj/
.vs/
/*.userprefs
/*.csproj
/*.pidb
/*.suo
/*.sln*
/*.user
/*.unityproj
/*.booproj
/.idea*/
# ============ #
# OS generated #
# ============ #
.DS_Store*
._*
.Spotlight-V100
Stack Overflow community, thank you in advance. This is driving me nuts.
I have been made aware that the problem had to do with that folders being created by unity and that somehow that messed up the order of ignoring/tracking and i am investigating.
I tracked down the problem in the end and it looks like is was in fact issue number 2, despite me thinking i had been careful to avoid that. The index of the repository I had was not "fresh" but had tracked files that was a carryover from an earlier iteration of the same project.
The solution was to remove the .gitignore and untrack ALL files. I think as an alternative I could have just create a fresh repo and uploaded just the asset folder and project settings folder together with the .ignore file i already had.
So yeah, rubber-duck, sorry.