git:将文件推送到openshift在线而不跟踪其更改 [英] git : push a file to openshift online without tracking its changes

查看:103
本文介绍了git:将文件推送到openshift在线而不跟踪其更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个本地存储库,并将代码推送到openshift在线远程存储库.然后,Openshift Online会自动部署该应用程序.

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

每次修改CSS时,我都必须运行一个脚本来对其进行最小化,并对缩小的文件进行跟踪,以便在openshift上进行推送.

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.

是否可以在不跟踪其更改的情况下推送缩小的文件? 通过git选项还是通过直接在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 ?

推荐答案

您可以在本地存储库中创建.gitignore文件,在其中添加文件名,下次更改文件时,git不会将其添加到索引阶段,但是除非您将其删除,否则旧版本的文件将保留在本地和远程存储库中. 忽略文件

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

这篇关于git:将文件推送到openshift在线而不跟踪其更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆