Tag

Git

6 posts

Git (/ɡɪt/) is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. Git was initially designed and developed by Linus Torvalds for Linux kernel development in 2005, and has since become one of the most widely adopted version control systems for software development.

Code

Best Practice to Remove a Git Submodule

When you need to remove a submodule from your Git repository, the most straightforward and recommended approach is to use the git rm command followed by a commit and push to the remote repository.

Code

GitLab的安装和升级, 一把辛酸泪

警告:

  • gitlab 提供了一键安装包, 这种从 source 编译的方法并不有趣, 每次升级和改配置都极其麻烦, 它只会浪费你现在以及预期的未来的生命, 要是打算用它做生产环境, 那绝对是你的不智
  • 在 gitlab 早期, 并没有那么好的条件, 因为历史原因才被迫这么做的. 本文作为历史存档, 仅作为参考, 主要目的是记录一段过去的血泪教训.

更新了下 gitlab. 留个 log. 安装可以按照说明文档 https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md, 若是6.x升级到7.14, 可以使用这个文档: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/6.x-or-7.x-to-7.14.md , 若7.14升级到8.0, 则可以使用这个文档: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/7.14-to-8.0.md. 一步一步走下去, 介绍得非常好. 本文也毫无意愿去吧内容翻译一下. 只是介绍下错误的处理.

Code

Gitlab服务端redis配置错误的一个解决

在gitlab配置完毕后,我们push一个repo,效果可能如下:

Bash
$ git push origin master:dev
enjoy code, enjoy life.
Total 0 (delta 0), reused 0 (delta 0)
remote: GitLab: An unexpected error occurred (redis-cli returned 1).
To git@xxx:root/my_project.git
 * [new branch]      master -> dev
这儿它提示得已经足够清楚,redis有问题.不过也再也找不到其它提示了.

Code

利用 git 自动部署环境

和 @Leniy 说到利用 git 自动部署的事情, @Leniy 问了句, 怎么配, 既然有人有兴趣, 我就扯几句.

git 无疑是一个很赞的版本管理系统, 简单易用不伤手. 而如果在 VPS 上部署一个 git, 每次提交后, 直接部署到环境中, 不用 ssh 登进去顶着 XXXms 的延迟穷倒腾. 说明一下, 我只是举个栗子, 实现了"自动部署"的要求, 看官可以做的远不止这些.