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. [Js/Jquery]天气接口简单使用

    写在前面 今天在群里有朋友使用一个天气api,觉得挺实用的,就记录一下.省的以后再花费功夫去找. 地址:http://www.k780.com/api,在这个网站提供了实用的几种接口,比如查询ip,天 ...

  2. INSERT IGNORE 与INSERT INTO的区别

      INSERT IGNORE 与INSERT INTO的区别就是INSERT IGNORE会忽略数据库中已经存在 的数据,如果数据库没有数据,就插入新的数据,如果有数据的话就跳过这条数据.这样就可以 ...

  3. hdu 1698 线段树 区间修改

    #include <cstdio> #include <cstdlib> #include <cmath> #include <map> #includ ...

  4. 浏览器解析HTML文档的资源并下载

    <img />,<style>这些资源是并行请求与加载. <script>脚本是同步请求与加载,阻塞加载.加载完成并执行后再继续解析HTML. 动态<scri ...

  5. wordpress无法安装这个包。: PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file 'C:\WINDOWS\TEMP/wordpress-4.tmp'

    朋友的wp博客好久没管理了,让ytkah帮忙打理一下,进到后台发现版本还是3.9的,那是比较早以前的版本了,早该升级了. 在升级wordpress时出现以下错误: 无法安装这个包: PCLZIP_ER ...

  6. 驱动笔记 - IO端口和IO内存

    访问IO端口 (#include <asm/io.h>) 设备资源struct resource{ resource_size_t start; //资源起始物理地址 resource_s ...

  7. iOS工程预编译文件的创建

    在搜索 添加工程名/自己的pch文件名记住加后缀  

  8. POJ 1338

    #include<iostream> #include<stdio.h> #include<iomanip> #define MAXN 100000 using n ...

  9. sql server 存储过程,事务

    1.存储过程,事务 CREATE PROCEDURE Proc_ceshi @id int, ), @returnval int output AS BEGIN SET NOCOUNT ON; Set ...

  10. 数据库(.udl)简单测试连接

    当我们烦于打开数据库进行连接的时候,我们可以用udl进行测试连接,并可以获得连接字符串. 1.新建一个txt文件,然后将后缀改成udl保存. 2.双击打开udl文件. 3.进行数据库连接测试. 4.用 ...