0

I have a local repository and push my code to an openshift online remote repository. Openshift Online then deploys the app automatically.

Each time I modify a CSS, I have to run a script to minify it and the minified file gets tracked in order to be pushed on openshift.

Would it be possible to push the minified file without tracking its changes ? Through a git option or by building the minified file directly on the openshift cartridge ?

Franckl
  • 1,401
  • 2
  • 12
  • 17
  • Possible duplicate of [Keep file in a Git repo, but don't track changes](https://stackoverflow.com/questions/9794931/keep-file-in-a-git-repo-but-dont-track-changes) – samm Mar 22 '19 at 02:57
  • Possible duplicate of [How can a file be stored in a Git repository without being tracked *while also* being kept up-to-date?](https://stackoverflow.com/questions/41152115/how-can-a-file-be-stored-in-a-git-repository-without-being-tracked-while-also) – samm Mar 22 '19 at 03:21

1 Answers1

0

You can make .gitignore file in your local repo, add your filename in it, next time you change the file, git will not add it to indexing stage but the old version of file will stay in local and remote repo unless your remove it. Ignoring files

Nima Saed
  • 111
  • 2
  • so I would have to manually upload the minified file to the remote repo each time I update it ? I was looking for a way for git to push the minified file without tracking its changes – Franckl Mar 04 '16 at 06:11
  • If you don't wanna track the file, why do you want to push the new version to repo? – Nima Saed Mar 07 '16 at 02:37
  • I need to publish the new minified css online and the server builds the app from the repo – Franckl Mar 13 '16 at 03:43