http://nicolasgallagher.com/simple-git-deployment-strategy-for-static-sites/

You can still ignore a tracked file. All this means is that you can't accidentally replace the existing version with a modified version, without using the "force"  flag. It's meant for exactly this situation, where a file must be tracked but may be charged during the build but those changes should not be accidentally committed.

Another option is to use the assume unchanged flag on the update index command.

http://git-scm.com/docs/git-update-index

There are very few work flows you can't support with git, but sometimes it does mean experimenting a little to find the right combination of commands and flags.

>> Can you give a deeper explaination on your seperating repo proposal?
At the moment you push changes to one repo and then use branches to switch between testing and production. I am suggesting you have one repo for testing and one for production. You push all the untested code into the testing repo. Once it's passed testing you push those changes into the production repo. You only every release from the production repo.

The workflow would be something like this...

[make changes] --- push ---> (test repo) >> [test changes] --- push ---> (prod repo) >> [deploy]

This is just a suggestion and it would probably need a bit of thinking through before you decide it would be the way to go. I'm not saying it is your best solution; rather, I offer it as something to consider if using the single repo with branches approach doesn't meet your workflow needs.

git deployment strategy的更多相关文章

  1. Kubernetes学习之路(十二)之Pod控制器--ReplicaSet、Deployment

    一.Pod控制器及其功用 Pod控制器是用于实现管理pod的中间层,确保pod资源符合预期的状态,pod的资源出现故障时,会尝试 进行重启,当根据重启策略无效,则会重新新建pod的资源. pod控制器 ...

  2. Kubernetes的控制器之Deployment的定义

    Deploy 的控制器定义参数介绍 [root@master manifests]# kubectl explain deploy KIND: Deployment VERSION: extensio ...

  3. 12个git实战建议和技巧

    摘要:git无疑是现在最热门的版本控制工具,而且正在进一步侵占SVN以及CVS的市场.本文作者从国外技术问答社区Stack Overflow整理的12个很实用的git使用技巧和建议,希望对你有帮助. ...

  4. 如何用 Git 合并两个库,并保留提交历史

    转载自 https://segmentfault.com/a/1190000000678808 背景 一个中型规模项目,开始规划时就打算采用 C/S 架构,后端是单纯的 API 服务,前端在 Web ...

  5. git强制合并另一个分支

    New分支和Old分支都修改了同样的部分,有冲突,但是想在Old分之上合并New分支的内容,并且以New分支为主,就是不自己手动解决冲突,碰到冲突,直接以New分支为主. 参考 https://git ...

  6. Kubernetes笔记(六):了解控制器 —— Deployment

    Pod(容器组)是 Kubernetes 中最小的调度单元,可以通过 yaml 定义文件直接创建一个 Pod.但 Pod 本身并不具备自我恢复(self-healing)功能.如果一个 Pod 所在的 ...

  7. k8s deployment controller源码分析

    deployment controller简介 deployment controller是kube-controller-manager组件中众多控制器中的一个,是 deployment 资源对象的 ...

  8. Kubernetes Deployment 源码分析(二)

    概述startDeploymentController 入口逻辑DeploymentController 对象DeploymentController 类型定义DeploymentController ...

  9. Kubenetes 资源清单定义入门

    Kubernetes 常用资源 资源  对象 工作负载型资源对象(workload): Pod  Replicaset  ReplicationController  Deployments Stat ...

随机推荐

  1. SQLserver分页查询实例

    Sqlserver数据库分页查询一直是Sqlserver的短板,闲来无事,想出几种方法,假设有表ARTICLE,字段ID.YEAR...(其他省略),数据53210条(客户真实数据,量不大),分页查询 ...

  2. unity3d中dllimport方法的使用,以接入腾讯平台为例!!!

    说到有关dllimport方法可能还有很多人比较陌生,其实我自己也说不太清楚,大概说说什么时候要用它. 事实上功能类似于调用android的第三包,我们想要使用苹果上特定的api或者第三方平台的一些东 ...

  3. Javascript全局变量的使用方法

    1.demo例子说明 <script type="text/javascript"> var gDivId; //js全局变量 function geocoder(la ...

  4. Ext Js学习之IIS理解

    站点分为静态网站和动态网站,纯粹利用html编写的网站属于静态网站,不宜维护和更新而利用C#+extjs等前台+后台技术编写的网站就属于动态站点,有更多的交互,易维护和更新,比如降价的页面,利用htm ...

  5. Extjs中自定义事件

    //Ext中所谓的响应事件,响应的主要是组件中已经定义的事件(通过看api各组件的events可以找到)         //主要作用就是利用on调用各组件的事件处理函数,然后在函数中作用户想要的操作 ...

  6. Java 中最常见的 5 个错误

    在编程时,开发者经常会遭遇各式各样莫名错误.近日,Sushil Das 在 Geek On Java上列举了 Java 开发中常见的 5 个错误,与君共「免」. 原文链接:Top 5 Common M ...

  7. P==NP??

    注:基础知识见下方 下面是关于P==NP ???  一些讨论,挺好玩的. 1. 首先强调一下数学上还没有证明这个问题!但是我们看看其他角度来看这个问题. 其次,心理上来说,要是可以证明P==NP那么早 ...

  8. js对象小结

    前奏 对象是js的基本数据类型,准确来说除了字符串,数字,boolean值,null与undifine之外,js中的值都是对象.js中的对象是一种复合值,他将很多值(原始值或其他对象)聚合在一起,可以 ...

  9. Windows X64 Patch Guard

    先简单介绍下PatchGuard ,摘自百度百科 PatchGuard就是Windows Vista的内核保护系统,防止任何非授权软件试图“修改”Windows内核,也就是说,Vista内核的新型金钟 ...

  10. Struts2 Convention插件的使用(2)return视图以及jsp的关系

    package com.hyy.action; import com.opensymphony.xwork2.ActionSupport; public class HelloWorld extend ...