[ GIT ] GIT tip : A simple .gitconfig file】的更多相关文章

reference : http://fle.github.io/git-tip-a-simple-gitconfig-file.html As several friends have asked me this, here is my ~/.gitconfig base file. Nothing special, just a few aliases and some syntax highlighting :). [user] name = Florent Lebreton email…
版本对比 1. 对比两个 COMMIT git diff <commit> <commit> 2. 对比 COMMIT 和父 COMMIT git diff <commit^> 或 git diff-tree -p <commit> 3. 只显示某一个 commit 修改过的文件名称 git diff-tree --no-commit-id --name-only -r <commit> 示例: $ git diff-tree --no-comm…
基础操作 git配置 git config --global user.name "Your Name" git config --global user.email "email@example.com" 创建文件夹与进入 mkdir learngit cd learngit 设置当前位置为git仓库 git init 添加至仓库(又名版本库) git add readme.md git commit -m "wrote a readme file fo…
傻瓜入门: step by step : https://try.github.io/levels/1/challenges/1 一本书: https://git-scm.com/book/en/v2 竟然有中文版 O.O: https://git-scm.com/book/zh/v2/ git实在是太复杂了,学呀学呀学不懂.只能一点点记下来,省得每次想好久.... 0. 新环境里的第一次配置: [root@D128 Src]# git config --global user.name "Ca…
Work flow with git and github Work with Remotes Check the current status git status Check the latest source on remote branch git fetch git status git log <remote>/<branch> --not <current_branch> git merge <remote>/<branch> Ad…
1. 配置git客户端 1.1 安装git bash https://git-scm.com/downloads 1.2 设置ssh Key 查看是否有ssh key ls -al ~/.ssh 没有则生成ssh key ssh-keygen -t rsa -b 4096 -C "your_email@example.com" 将生成的公钥 (.pub为后缀) 上传到git网站上 eval $(ssh-agent -s) //确定ssh-agent正在运行 ssh-add ~/.ssh…
https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks https://github.com/git/git/blob/master/templates/hooks--commit-msg.sample 8.3 Customizing Git - Git Hooks Git Hooks Like many other Version Control Systems, Git has a way to fire off custom scr…
error: failed to push some refs to 'git@git.caicaivip.com:devops/thor.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before push…
1.安装 分布式版本控制:工作电脑保存完整的代码,中央服务器挂了也可以使用 集中式版本控制:中央服务器挂了就凉凉 sudo apt-get install git git安装 检测安装成功 git 2.创建版本库  新键一个目录git_test mkdir git_test 初始化git init git init 3.版本的创建和使用 在git_test目录下创建一个文件code.txt touch code.txt 创建一个版本 设置邮箱 git config --global user.e…
https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks https://github.com/git/git/blob/master/templates/hooks--commit-msg.sample 8.3 Customizing Git - Git Hooks Git Hooks Like many other Version Control Systems, Git has a way to fire off custom scr…