welcome to my blog问题:在windows10下使用git clone速度太慢了, 需要使用代
welcome to my blog执行git -am file即可将add和commit操作合并, 不需要先
welcome to my blog问题描述: 使用git push时报错: Connection reset by 13.229
welcome to my blog问题描述: 默认的克隆方式克隆的是master分支, 现需要克隆指
列出master分支下跟踪的文件 git ls-tree -r master --name-only–name-only选项能使结果看起来简洁些
git clone 仓库地址 仓库新名字
问题描述: 使用git add添加一个文件名带空格的文件会报错: fatal: pathspec '‘dem
github官方解释只要是在fork的仓库上进行提交, 就不算contributions, 也就是首页不会有绿色的方块解决方法有三个:使用pull request, 这个最麻烦…还要跟项目的主管理员沟通获取项目的管理权限…这个也麻烦, 我就是想fork一个自己操作操作, 都不认识项目的管理员把项目文件下载下来, 在github上创建个新仓库, 将项目push到新仓库中, 这下自己就是管...
welcome to my blog设置用户名git config --global user.name “Hinata”去掉–global设置的是局部用户名设置邮箱git config --global user.email "abc@163.com"去掉–global设置的是局部邮箱查看配置git config -l...
welcome to my blog方法一git config –global core.editor vim方法二, 编辑~/.gitconfig,在[core]下面添加editor = vim, 如下图所示
welcome to my blog问题: 在某个仓库中拉取另一个仓库的内容时报错:fatal: refusing to merge unrelated histories原因:两个没有关系的仓库的提交历史无法merge解决办法: 使用--allow-unrelated-histories参数忽略不相关的提交历史, git pull origin master --allow-unrelat...
welcome to my blog使用git add时出现了警告warning: LF will be replaced by CRLF in weibo_triple.dat.The file will have its original line endings in your working directoryLF是linux下的换行符, CRLF是windows下的换行符我是...
welcome to my blog执行命令 git pull <remote> <branch>如拉取远程仓库origin的local分支到当前分支git pull origin local
welcome to my blog执行命令 git config –-global core.editor vim
welcome to my blog给远程仓库改了个名字, 本地仓库的信息没有改变, 需要先删除原来的仓库链接, 然后再添加新的仓库链接显示远程仓库信息git remote -v结果origin git@github.com:smallhaes/blog.git (fetch)origin git@github.com:smallhaes/blog.git (push)删除远程...
welcome to my bloggit拉取远程仓库的内容时报错fatal: refusing to merge unrelated histories因为本地仓库和远程仓库不相关, 想要拉取更新需要忽略各自的历史, 拉取时加上参数--allow-unrelated-histories即可完整的拉取命令git pull origin master --allow-unrelated-hi...
welcome to my blog使用如下命令拉取指定仓库的指定分支git pull <remote> <branch>具体例子:拉取origin的master分支git pull origin master或者直接设置当前分支跟踪远程仓库的某条分支git branch --set-upstream-to=origin/<branch> mas...
welcome to my blog使用如下命令将本地仓库和远程仓库连接git remote add 远程仓库的名字(自己起) 远程仓库的地址具体例子git remote add origin git@github.com:hinata/naruto.git查看远程仓库详细信息git remote -v...
welcome to my blog使用以下命令进行测试ssh -T git@github.com
welcome to my blog向.gitignore中添加了新文件, 但是git status还是显示了该文件的状态?原因: 之前使用git add 跟踪了该文件解决方法: 不在让git跟踪该文件git rm --cached filename...
welcome to my blog让本地的local分支跟踪远程的local分支具体方法git branch --set-upstream-to=远程分支 本地分支具体示例git branch --set-upstream-to=origin/local local
welcome to my blog问题: 使用hexo搭建博客, 执行hexo init时包含git clone的操作,但是使用的是https协议, 不是ssh, 所以为git设置
welcome to my blog问题描述: 使用win10中的ubuntu1804的git查看windows上的文件, 发现都是’modified’状态问题原因: windows使用CR LF作为换行符; Linux使用LF作为换行符, 所以Linux认为windows中的文件多了个CR, 就变成modified状态了解决方法, 让git忽略换行符的差别git config --glob...
welcome to my blog存储一些大文件,用git lfs传输速度会快一些吗? 用用再说先记录一些git lfs的常用命令, 主要有三个命令在仓库中创建git lfs的使用环境 git lfs installgit lfs跟踪某个文件git lfs track "*.psd"执行完该命令后会生成.gitattributesgit跟踪.gitattributes git add ...
welcome to my blog一.查看cpu架构lscpu二.下载对应版本的linux安装包,下载地址下载最新版的就行, 我下载时的最新版是v2.9.0三.把文件传到linux上, 解压tar -zxvf git-lfs-linux-amd64-v2.9.0.tar.gz四.安装sudo ./install.sh...
welcome to my bloggit rm --cached fileName执行该命令后, git不再跟踪fileName, 但是fileName文件仍保留git rm -f fileName执行该命令后, git不再跟踪fileName, 同时fileName文件被删除...
Copyright © 2005-2023 51CTO.COM 版权所有 京ICP证060544号