随笔分类 -  软件工程相关 / Git

摘要:1. 选取最近3次的历史提交。 // git rebase -i HEAD~3 2. 按i 进入vim编辑模式 3. 基于以下指令进行修改 r, reword <commit> = use commit, but edit the commit message // 修改commit信息 s, sq 阅读全文
posted @ 2022-07-03 13:55 IslandZzzz 阅读(233) 评论(0) 推荐(0) 编辑
摘要:git查看某个文件的修改记录 先使用git log filename 或者 git log --pretty=oneline filename查询到某个文件的提交历史记录 PS C:\Users\10128\Desktop\Note\main> git log --pretty=oneline in 阅读全文
posted @ 2022-04-11 19:05 IslandZzzz 阅读(3039) 评论(0) 推荐(0) 编辑
摘要:今天在git上新建了个仓库,一开始使用https的方式克隆,报错timeout 为了解决这个问题,搜了很多方案,例如配置git config的http.proxy、配置host等,都以失败告终 遂决定使用ssh方式克隆,终成功 1 生成ssh 查看根目录 .ssh文件夹下有没有ssh文件, 没有就新 阅读全文
posted @ 2022-03-06 00:15 IslandZzzz 阅读(194) 评论(0) 推荐(0) 编辑
摘要:删除本地分支 git branch -d xxx 删除远程分支 git push origin --delete xxx 阅读全文
posted @ 2021-12-27 10:52 IslandZzzz 阅读(30) 评论(0) 推荐(0) 编辑
摘要:git commit -a --amend -m "xxx" 阅读全文
posted @ 2021-12-08 19:31 IslandZzzz 阅读(93) 评论(0) 推荐(0) 编辑
摘要:git 常用命令 git add . 将文件添加到暂存区 git commit -m "" 将文件添加到本地仓库 git push origin master 将文件添加到远程仓库 git pull 将远程代码拉取到本地 新人来了拉取项目 git clone 将远端仓库拉到本地仓库 git clon 阅读全文
posted @ 2020-08-05 20:45 IslandZzzz 编辑
摘要:关于pull和fetch pull是合并,不会覆盖 远程覆盖本地 git fetch --all git reset --hard origin/master 克隆指定分支代码并且指定项目名 git clone -b bh1 https://github.com/fxy1024/testlt.git 阅读全文
posted @ 2020-08-05 19:37 IslandZzzz 阅读(326) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示