cfanzp

个人Linux开发笔记

tmux基本配置及vim适配

tmux基本配置 tmux是什么? tmux是一个终端复用工具。对于服务端开发的程序员或运维人员而言用处十分大。大大提高了工作效率。 下载 1 wget http://cznic.dl.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz 安装 centos安装 1 2 3 4 5 6 yum install libevent-devel ncurses-devel tar -zxvf tmux-1.9.tar.gz cd tmux-1.9 ./configure make make install ubuntu 1 sudo apt install tmux 查看版本号 1 tmux -V 使用 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 tmux #开启tmux tmux ls #显示已有tmux列表(C-b s) tmux attach-session -t 数字 #选择tmux C-b c 创建一个新的窗口 C-b n 切换到下一个窗口 C-b p 切换到上一个窗口 C-b l 最后一个窗口,和上一个窗口的概念不一样哟,谁试谁知道 c-b w 通过上下键选择当前窗口中打开的会话 C-b 数字 直接跳到你按的数字所在的窗口 C-b & 退出当前窗口 C-b d 临时断开会话 断开以后,还可以连上的哟:) C-b " 分割出来一个窗口 C-b % 分割出来一个窗口 C-b o 在小窗口中切换 C-b (方向键) C-b !

git学习笔记

git学习笔记 git 缩写配置 在home目录创建.gitconfig文件复制粘贴以下配置并保存退出 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 [user] name = xx email = xx@qq.com [color] interactive = auto diff = auto status = auto branch = auto ui = true repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = false [alias] co = checkout ci = commit st = status sh = stash sa = stash apply sp = stash pop ap = add -p br = branch cp = checkout -p cv = commit -v dc = diff --cached d = diff pr = pull --rebase ps = push l = log --graph --pretty=format:'%C(yellow)%h%Creset %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --all lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all [hub] protocol = https [diff] tool = vimdiff [core] editor = vim 常用缩写 git co git br git st git lg 工作流 开发新功能a 1 2 3 4 5 sequenceDiagram participant proj1 participant a proj1->>a:基于proj1分支创建一个a分支(step1) a->>proj1:a分支开发完后合并入proj1分支,并删除a分支(step2) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 step1: git br a proj1 git push origin a step2: git co proj1 git pull git co a git merge proj1 git push git co proj1 git merge a git push git br -D a 常用命令 删除远程分支a: 切换到本地其它分支,如master 1 git co master 删除远程分支 1 git push origin --delete a 修改远程分支地址 1 2 3 git remote -v git remote rm origin git remote add origin git@gitee.