包含标签 git 的文章

git log介绍

查看 1 $ git log 简化版日志 1 $ git log --pretty=oneline 查看前N条 1 git log -n 变更日志 -n 同上,不加则显示全部 1 git log --stat -n 查看提交修改 查看某次commit做了哪些修改 1 git show <commit-hash-id> 退出log状态 有时……

阅读全文

git tag 介绍

标签 tag就是一个让人容易记住的有意义的名字,它跟某个commit绑在一起。 新建一个标签 1 $ git tag <tagname> 命令git tag <tagname>用于新建一个标签,默……

阅读全文

git Version Control介绍

初始化一个Git仓库 1 $ git init 添加文件到Git仓库 1 2 $ git add <file> $ git commit -m "description" git add可以反复多次使用,添加多个文件,git commit可以一次提交很多文件,-m后面输……

阅读全文

git 远程仓库介绍

创建SSH Key 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 $ ssh-keygen -t rsa -C "[email protected]" Generating public/private rsa key pair. # 生成密钥对 Enter file in which to save the key (/root/.ssh/id_rsa): # 保存路径 Enter passphrase (empty for no passphrase): # 密码,默认空 Enter same passphrase again: # 重复密……

阅读全文

git其他知识介绍

常用忽略文件 https://github.com/seeways/MyIgnore 配置别名 1 git config --global alias.<name> <git-name> 建议熟悉git命令后使用 1 2 3 4 5 # 设置别名 git config --global alias.unstage 'reset HEAD' # 使用别名撤掉修改,实际执行git reset HEAD test.py git unstage test.py 对长命令的别名尤其好用 git……

阅读全文

git基础介绍

Git配置 1 2 $ git config --global user.name "Your Name" $ git config --global user.email "[email protected]" git config命令的--global参数,表明这台机器上的所有Git仓库都会使用这个配置,也可以对某个仓库指定不同的用户……

阅读全文

git提交代码到github提示失败

1、报错信息 Connection reset by 20.205.243.166 port 22 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 2、处理方案 尝试将host文件中添加 192.30.255.112 github.com git 185.31.16.184 github.global.ssl.fastly.net……

阅读全文

git整体介绍

版本控制 什么是版本控制 为什么要版本控制 本地版本控制系统 集中化的版本控制系统 分布式版本控制系统 认识 Git Git 简史 Git 与其他版本管理系统的主要区别 Git 的三种状态 Git 使用快速入门……

阅读全文

git常用的操作

git常用的操作语法介绍 1、回归合并代码的请求 git checkout . && git clean -xdf 2、强制删除本地的代码分支 git branch -D branchName 3、检出代码到本地 git checkout -b 本地分支名 远程分支名……

阅读全文