随笔分类 -  git

摘要:本地登录多账号并连接对应的远程仓库,主要就是 密钥配对,我这里刚开始配了密钥也将密钥复制到ssh但是还是连接不到第二个远程仓库,后来发现是需要 密钥代理 1、在当前项目下更改git账号信息; git config user.name "xxxxxx" git config user.email "x 阅读全文

posted @ 2023-06-20 19:01 嗷呜~ 阅读(158) 评论(0) 推荐(1) 编辑

摘要:ssh: Could not resolve hostname origin: Name or service not knownfatal: Could not read from remote repository. Please make sure you have the correct a 阅读全文

posted @ 2020-08-13 14:25 嗷呜~ 阅读(3410) 评论(0) 推荐(0) 编辑

摘要:Host key verification failed.fatal: Could not read from remote repository. Please make sure you have the correct access rightsand the repository exist 阅读全文

posted @ 2020-08-06 17:45 嗷呜~ 阅读(6055) 评论(0) 推荐(0) 编辑

摘要:修改本地电脑的仓库用户名和邮箱 先查看本地的用户名和邮箱 git config user.name git config user.email 发现是上个用户的,进行修改 git config --global user.name "your name" git config --global us 阅读全文

posted @ 2020-07-31 10:45 嗷呜~ 阅读(3320) 评论(0) 推荐(0) 编辑

摘要:在项目开发中,我们存在用到某个分支某项功能的情况,这个时候我们需要合并某个commit git cherry-pick XXX(commit的id) 具体用法: 我们需要先checkout到需要用到的某项功能的分支,然后git log 得到commit 日志。记录需要用到的commit 的id, 切 阅读全文

posted @ 2020-06-15 11:06 嗷呜~ 阅读(632) 评论(0) 推荐(0) 编辑

摘要:例如: 'origin/mini-admin' is not a commit and a branch 'mini-admin' can' cannot be created from it 先执行 git pull 然后:git checkout -b mini-admin origin/min 阅读全文

posted @ 2020-04-26 11:10 嗷呜~ 阅读(2649) 评论(0) 推荐(0) 编辑

摘要:git clone -b 远程分支名 远程地址 git clone -b dx-admin http://XXXXXXXX/XXX/XXXXX.git -b 指向远程仓库分支名 阅读全文

posted @ 2020-04-26 10:51 嗷呜~ 阅读(602) 评论(0) 推荐(0) 编辑

摘要:git 回退历史版本 git log 查看版本 git reset --hard 139dcfaa558e3276b30b6b2e5cbbb9c00bbdca96 回退版本 git push -f -u origin remote_branch 强制推送到远程分支 阅读全文

posted @ 2020-04-16 18:03 嗷呜~ 阅读(181) 评论(0) 推荐(0) 编辑

摘要:git pull 时 报错:There is no tracking information for the current branch. 意思是 当前 banch 没有跟踪信息。 当前 分支 没有和远程分支关联,将当前分支和远程分支关联即可。 git branch --set-upstream- 阅读全文

posted @ 2020-04-16 16:23 嗷呜~ 阅读(535) 评论(0) 推荐(0) 编辑

摘要:想要本本地创建一个新的分支,并关联远程已经存在的分支。 一般在一个分支下创建新的分支时,会把上个分支的内容copy到新分支中,如果我们不想要上个分支的内容,创建干净的分支并关联远程分支的话。 git checkout -b 本地分支名 origin/远程分支名 阅读全文

posted @ 2020-04-10 12:10 嗷呜~ 阅读(1832) 评论(0) 推荐(0) 编辑

摘要:git branch --set-upstream-to=origin/remote_branch your_branch 阅读全文

posted @ 2020-03-08 22:36 嗷呜~ 阅读(177) 评论(1) 推荐(0) 编辑

摘要:1. 查看所有tag git tag 2.查看某个版本系列的tag git tag -l 'v1.0.1' 3.创建标签 (注意:要有 -m) git tag -a v1.0.1 -m "内容:v1.0.1" 4.推送标签 git push origin v1.0.1 5.删除标签 删除本地: gi 阅读全文

posted @ 2020-03-08 22:34 嗷呜~ 阅读(184) 评论(0) 推荐(0) 编辑

摘要:1,先在gitLab 上创建一个新的项目,把开发人员加入项目 2,在本地项目初始化git git init 3,git add . 4, git commit -m "XX" 添加本地项目到仓库 5,git push http://xxxxxx/xxxx/xxxx.git master 这时 确实把 阅读全文

posted @ 2020-01-19 01:35 嗷呜~ 阅读(5227) 评论(0) 推荐(0) 编辑

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