随笔分类 -  Git

摘要:部署 创建账户 创建完 设置个密码 然后可以用用户登录了,登录的第一次重新设置密码。 设置权限 Gitlab权限管理Gitlab用户在组中有五种权限:Guest、Reporter、Developer、Master、Owner Guest:可以创建issue、发表评论,不能读写版本库Reporter: 阅读全文
posted @ 2021-11-15 10:16 富坚老贼 阅读(43) 评论(0) 推荐(0) 编辑
摘要:查看分支 git branch 远程分支 git branch -r 创建分支 git branch 名称 切换分支 git checkout 分支名 删除分支 需切换到其他分支后再删除 git branch -D 分支名 #大写d不提示,直接删除 git branch -d #小写d提示处理合并后 阅读全文
posted @ 2021-06-02 08:25 富坚老贼 阅读(37) 评论(0) 推荐(0) 编辑
摘要:把无用的文件留在objects下其他存入objects-pack下 git gc 删除无用文件 git prunegit prune -n # 模拟执行删除 查看无法被引用的对象 git fsck 删除一些prune删除不掉的文件 阅读全文
posted @ 2020-08-22 11:21 富坚老贼 阅读(385) 评论(0) 推荐(0) 编辑
摘要:查看文件类型 blob tree commit tag git cat-file -t 013612 013612 是文件夹名+文件组成的前6位数 查看文件内容 git cat-file -p 013612 查看文件大小 git cat-file -s 013612 object对象哈希值的计算 文 阅读全文
posted @ 2018-11-27 15:24 富坚老贼 阅读(169) 评论(0) 推荐(0) 编辑
摘要:将分支推送到远程存储库时遇到错误: rejected Updates were rejected because the remote contains work that you do not have locally 在仓库目录下执行 git pull origin master --allow 阅读全文
posted @ 2018-09-06 10:46 富坚老贼 阅读(170) 评论(0) 推荐(0) 编辑
摘要:1.安装git 2.打开 Git Bash 输入ssh ,查看是否安装了ssh 这个界面是安装了的意思 3.生成ssh 输入ssh-keygen -t rsa 指令, 再连续按三次回车 会生成两个文件。密钥id_rsa和公钥id_rsa.pub 隐藏文件默认生成在 Linux 系统:~/.sshMa 阅读全文
posted @ 2018-04-09 23:22 富坚老贼 阅读(160) 评论(0) 推荐(0) 编辑
摘要:1.创建一个版本库 #创建一个文件夹 E:\>mkdir pythonGit #进入文件夹 E:\>cd pythonGit #把此目录创建成git版本库 E:\pythonGit>git init Initialized empty Git repository in E:/pythonGit/. 阅读全文
posted @ 2018-04-04 23:35 富坚老贼 阅读(168) 评论(0) 推荐(0) 编辑
摘要:# 忽略指定文件夹 /a # *匹配多个字符,如忽略后缀名 *.ts # **忽略多层文件夹 **/bin/Debug # ?匹配单个字符 a?c.js # []配合任意字符 [th]ello.js [a-z]ello.js #忽略具体某个文件 /b/hi.html #不忽略某个文件 !/b.ts 阅读全文
posted @ 2017-12-26 10:56 富坚老贼 阅读(338) 评论(0) 推荐(0) 编辑
摘要:一、 下载及安装 下载 git2.14.1 64bit https://git-for-windows.github.io/(官网下载不动) http://download.csdn.net/download/tang9018/9934317 (下载快) https://git-scm.com/bo 阅读全文
posted @ 2017-09-17 13:56 富坚老贼 阅读(974) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-06-18 16:08 富坚老贼 阅读(109) 评论(0) 推荐(0) 编辑
摘要:推送到远程 全写 #git push 远程主机名 本地分支 远程分支 git push git@192.166.208.152:xxx/test.git master:master 远程仓库起别名为 test git remote add test git@github.com:xxx/test.g 阅读全文
posted @ 2017-03-11 18:12 富坚老贼 阅读(169) 评论(0) 推荐(0) 编辑
摘要:查看标签 查看本地所有标签 git tag 查看远程所有标签 git ls-remote --tags 远程库 查看标签详细信息 git show 标签名 使用通配方式筛选要显示标签 git tag -l 'v2*' # 查看v2版本的所有标签 -l或者 --list 创建标签 标签分为轻量标签(l 阅读全文
posted @ 2016-06-12 14:27 富坚老贼 阅读(181) 评论(0) 推荐(0) 编辑

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