随笔分类 - Git
摘要:git撤销某个文件的修改,分为两种情况: 在工作区修改,但并未提交到暂存区(即并没有add)。 对于单个文件的撤销修改而言,使用下面方法。 git checkout -- 文件名 若想撤销工作区中所有文件的修改,则 git checkout . 注意:git chekcout 是让文件回到最近一次该
阅读全文
摘要:git分支误删除恢复方法 git log -g 找回之前提交的commit git branch branchName commit号 用这个commit创建一个分支
阅读全文
摘要:git merge 极简核心用法;merge 冲突解决;fatal: cannot do a partial commit during a merge.;“git add -A” 和 “git add .” 的区别
阅读全文
摘要:用两行命令删除分支 // 删除本地分支 git branch -d localBranchName // 删除远程分支 git push remoteName --delete remoteBranchName git push origin --delete origin/zkx 错误的,应该为g
阅读全文
摘要:Git下载 Git 下载地址 Git图形化操作工具Sourcetree 下载地址 Git操作在线学习 配置用户名与邮箱 git config --global user.name "kaixuan" git config --global user.email "zhangkaixuan98@163
阅读全文
摘要:1. 服务器端创建空仓库 初始化git cd ~ mkdir test cd test git init 终端显示一个初始好的git路径 配置git git config receive.denyCurrentBranch ignore 未执行,则在本地push时报错 2. 本地添加远程仓库并p
阅读全文
摘要:背景 $ ssh -T git@github.com ssh: Could not resolve hostname github.com: No address associated with hostname 解决方法: 1、首先获取 github.com IP 地址 IP 地址查询:Click
阅读全文