随笔分类 -  git

摘要:https://www.cnblogs.com/mq0036/p/14699655.html 阅读全文
posted @ 2024-01-09 18:25 thammer 阅读(3) 评论(0) 推荐(0) 编辑
摘要:需求的产生:公司原来的git仓库位于机房的一台服务器上,当初安全意识不强,没做足够的备份工作,后来这台服务器硬盘坏了,于是在腾讯云上搭了一个gitea,需要从本地代码仓库迁移到新的仓库。 1. 断开本地仓库与原远程仓库的关联 git remote rm origin 2.关联新的远程仓库 git r 阅读全文
posted @ 2022-05-10 17:26 thammer 阅读(311) 评论(0) 推荐(0) 编辑
摘要:本地分支重命名 git branch -m oldName newName 将重命名后的分支推送到远程 git push origin newName 删除远程的旧分支 git push --delete origin oldName 阅读全文
posted @ 2022-01-08 11:16 thammer 阅读(48) 评论(0) 推荐(0) 编辑
摘要:配置 1. git config git config 分为全局和局部 全局:git config --glabol 局部:git config 最终会生成配置文件,一般在~/.gitconfig。 2. core git config --global core.fileMode git conf 阅读全文
posted @ 2019-05-08 14:35 thammer 阅读(139) 评论(0) 推荐(0) 编辑
摘要:缘由 :每次向github提交代码时都要输入用户名密码,太麻烦了,影响效率 解决方案: 方案一: 在你的用户目录下新建一个文本文件.git credentials Windows:C:/Users/username Mac OS X: /Users/username Linux: /home/use 阅读全文
posted @ 2019-03-21 09:41 thammer 阅读(1504) 评论(0) 推荐(0) 编辑
摘要:应用场景: 在github上fork一个自己想看的开源项目,想基于某个tag来写一些测试demo,然后可以做到版本控制。 方法: 这样即可以看到项目最新的动态,又可以将自己的代码基于某个稳定的版本写的测试代码管理起来。 阅读全文
posted @ 2017-08-05 23:24 thammer 阅读(1374) 评论(0) 推荐(0) 编辑

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