Context
I want to keep track of the history of a local script in a project root folder using git, but I do not want to push it on remote.    
Therefore, this file is now referenced in my .gitignore file, so it is not tracked locally.
But I would like to track it on my local machine (while always keeping the remote without this file).    
Ideas
This seemed to be a solution; Track files in local Git repo but ignore in remote but it needs the creation of a subfolder, which I don't want to create for different reasons, and thus keeping all my script files at the root of my folder.
Question
Is there a simple way to do so?
 
     
    