master

GIt仓库

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 04:06:55
1、把文件提交到版本库: 2、版本回退: 3、还原文件操作: 4、撤销修改: 5、删除文件: 6、添加远程库: 7、从远程库克隆: 8、创建和合并分支: 9、解决冲突: 10、分支管理: 11、Bug分支: 12、feature分支: 13、多人协作: 开始: 在电脑中有一个合适的位置创建一个空的文件夹 通过git init命令将这个文件夹变成Git可管理的仓库 把文件提交到版本库: 用git add + 文件名 将这个文件添加到暂存区 git commit -m"" 在暂存区的文件提交到当前的分支。 引号内部是对本次提交的一个说明,要有意义的,这样就能从历史记录中找到改动记录。    commit可以一次提交很多的文件,所以你可以多次add不同的文件然后再一次行commit。 版本回退:   Git仓库中有一个HEAD指针,指向的是当前版本,Git可以在版本的历史之间来回穿梭:git reset --hard commit-id   穿梭到前面的版本:可以使用git log查看提交日志,方便确定回退到哪一个版本。   回来未来的版本: 用git reflog查看历史命令 还原文件操作:   git checkout -- <filename> 会产生两种情况:1、在你做出修改后还没有添加到暂存区,现在撤销就是回到和版本库一摸一样的状态。 2、添加到了暂存区,又作了修改

How to make Head point to master in git?

青春壹個敷衍的年華 提交于 2019-12-10 03:59:44
问题 Please help to make Head point to master in git I tried to git rebase HEAD master and git checkout master Nothing of those helps. Updated: Strange I tried: git symbolic-ref HEAD refs/heads/master then git rev-parse refs/heads/master fc550e5ff2fe49d64ee1d8bf0da09b2b24bf2cd7 and then I got strange warning after the following command git rev-parse HEAD warning: refname 'HEAD' is ambiguous. fc550e5ff2fe49d64ee1d8bf0da09b2b24bf2cd7 New Update: There was HEAD branch in remotes -> origin . After

Why does git say I am 40 commits ahead when I seem up to date and a push-pull (no files) fixes it?

别来无恙 提交于 2019-12-10 02:28:07
问题 I switch to master and it says I am ahead by 40 commits: $ git checkout master Switched to branch 'master' Your branch is ahead of 'origin/master' by 40 commits. But when I then do a pull it says I am up-to-date: $ git pull origin master From https://github.com/dmcouncil/dmWorkflow * branch master -> FETCH_HEAD Already up-to-date. However I can resolve this (remove the 40 commits msg) with: Michaels-MacBook-Pro-2:dmWorkflow durrantm$ git push origin master Everything up-to-date and now the '

MySQL主从复制的配置

为君一笑 提交于 2019-12-09 23:22:22
MySQL 主从复制的配置 环境 操作系统:CentOS-6.6-x86_64-bin-DVD1.iso MySQL版本:mysql-5.6.26.tar.gz 主节点IP:192.168.1.205 主机名:edu-mysql-01 从节点IP:192.168.1.206 主机名:edu-mysql-02 主机配置:4核CPU、4G内存 依赖课程 《高可用架构篇--第13节--MySQL源码编译安装(CentOS-6.6+MySQL-5.6)》 MySQL 主从复制官方文档 http://dev.mysql.com/doc/refman/5.6/en/replication.html MySQL 主从复制的方式 MySQL5.6开始主从复制有两种方式:基于日志(binlog)、基于GTID(全局事务标示符)。 本教程主要讲基于日志(binlog)的复制。 MySQL 主从复制(也称A/B 复制)的原理 (1) Master将数据改变记录到二进制日志(binarylog)中,也就是配置文件log-bin指定的文件,这些记录叫做二进制日志事件(binary log events); (2) Slave通过I/O线程读取Master中的binary logevents并写入到它的中继日志(relay log); (3) Slave重做中继日志中的事件

Git详解之九 Git内部原理

随声附和 提交于 2019-12-09 22:53:59
Git 内部原理 不管你是从前面的章节直接跳到了本章,还是读完了其余各章一直到这,你都将在本章见识 Git 的内部工作原理和实现方式。我个人发现学习这些内容对于理解 Git 的用处和强大是非常重要的,不过也有人认为这些内容对于初学者来说可能难以理解且过于复杂。正因如此我把这部分内容放在最后一章,你在学习过程中可以先阅 读这部分,也可以晚点阅读这部分,这完全取决于你自己。 既然已经读到这了,就让我们开始吧。首先要弄明白一点,从根本上来讲 Git 是一套内容寻址 (content-addressable) 文件系统,在此之上提供了一个 VCS 用户界面。马上你就会学到这意味着什么。 早期的 Git (主要是 1.5 之前版本) 的用户界面要比现在复杂得多,这是因为它更侧重于成为文件系统而不是一套更精致的 VCS 。最近几年改进了 UI 从而使它跟其他任何系统一样清晰易用。即便如此,还是经常会有一些陈腔滥调提到早期 Git 的 UI 复杂又难学。 内容寻址文件系统这一层相当酷,在本章中我会先讲解这部分。随后你会学到传输机制和最终要使用的各种库管理任务。 9.1 底层命令 (Plumbing) 和高层命令 (Porcelain) 本书讲解了使用 checkout, branch, remote 等共约 30 个 Git 命令。然而由于 Git 一开始被设计成供 VCS

Git详解之九:Git内部原理

北城余情 提交于 2019-12-09 22:51:26
Git 内部原理 不管你是从前面的章节直接跳到了本章,还是读完了其余各章一直到这,你都将在本章见识 Git 的内部工作原理和实现方式。我个人发现学习这些内容对于理解 Git 的用处和强大是非常重要的,不过也有人认为这些内容对于初学者来说可能难以理解且过于复杂。正因如此我把这部分内容放在最后一章,你在学习过程中可以先阅 读这部分,也可以晚点阅读这部分,这完全取决于你自己。( 伯乐 在线注:如果你对Git还不了解,建议从本 Git 系列 第一篇文章 开始阅读) 既然已经读到这了,就让我们开始吧。首先要弄明白一点,从根本上来讲 Git 是一套内容寻址 (content-addressable) 文件系统,在此之上提供了一个 VCS 用户界面。马上你就会学到这意味着什么。 早期的 Git (主要是 1.5 之前版本) 的用户界面要比现在复杂得多,这是因为它更侧重于成为文件系统而不是一套更精致的 VCS 。最近几年改进了 UI 从而使它跟其他任何系统一样清晰易用。即便如此,还是经常会有一些陈腔滥调提到早期 Git 的 UI 复杂又难学。 内容寻址文件系统这一层相当酷,在本章中我会先讲解这部分。随后你会学到传输机制和最终要使用的各种库管理任务。 9.1 底层命令 (Plumbing) 和高层命令 (Porcelain) 本书讲解了使用 checkout, branch, remote 等共约

Redis常见问题及处理方法

时光总嘲笑我的痴心妄想 提交于 2019-12-09 21:25:31
一、Redis状态检查 唯一标记一个redis实例的是ip和端口,前端是用tcp方式来访问redis的,我们提供给应用访问的是一个ip+63379(一般使用63379) 端口。因此我们执行如下命令检查redis状态: 上面的role这个值一定是master的,只要保证vip在master上我们的Padis cache服务就是没有问题的,如果不通或者role的角色是slave,那就得继续查看是什么问题. 二、两个redis的角色都是slave的问题 当两个主机都挂了或者我们自己不小心将两个redis停了,并且我们用下面的命令检查 /wls/wls81/redis/bin/redis-cli -h {ip} -p {port} -a {password} info replication 发现无论是vip还是另外的两个ip都是role:slave 的角色,这个时候需要对vip所在的主机执行slaveof no one 的操作,将vip 所在的redis变成master,如: /wls/wls81/redis/bin/redis-cli -h {vip} -p {port} -a {password} slaveof no one 三、sentinel的配置参数 我们的sentinel 配置文件里面有两个重要的配置 sentinel monitor pds_jks-core-prd 10

MySQL 部署分布式架构 MyCAT (一)

三世轮回 提交于 2019-12-09 20:01:08
架构 环境 主机名 IP db1 192.168.31.205 db2 192.168.31.206 前期准备 开启防火墙,安装配置 mysql (db1,db2) firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.31.0/24" accept" firewall-cmd --reload mkdir /software # 把软件 mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz 上传到 /software cd /usr/local/ tar zxf /software/mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz mv mysql-5.7.20-linux-glibc2.12-x86_64 mysql # 初始化数据 mkdir /data/33{07..10}/data -p mysqld --initialize-insecure --user=mysql --datadir=/data/3307/data --basedir=/usr/local/mysql mysqld --initialize-insecure --user=mysql --datadir=/data

what should the master branch contain in git

被刻印的时光 ゝ 提交于 2019-12-09 17:48:03
问题 I have read about multiple different git branching strategies and I was suprized that the master branch was often used as a 'production-ready' branch and there would be an additional uat and dev branch. I'm thinking to set up our git repository with the same 3 branches, but to let 'master' contain the dev code and add a production and uat branch. That way, developers can simply merge to the default git branch (being 'master'). Is there a reason not to do it like that? gr, Coen 回答1: There is

Mesos 1.1.1 发布说明

蓝咒 提交于 2019-12-09 17:43:00
Release Notes - Mesos - Version 1.1.1 (WIP) This is a bug fix release. Release Notes - Mesos - Version 1.1.0 This release contains the following new features: [MESOS-2449] - Experimental support for launching a group of tasks via a new LAUNCH_GROUP Offer operation. Mesos will guarantee that either all tasks or none of the tasks in the group are delivered to the executor. Executors receive the task group via a new LAUNCH_GROUP event. [MESOS-2533] - Experimental support for HTTP and HTTPS health checks. Executors may now use the updated HealthCheck protobuf to implement HTTP(S) health checks.