摘要:原因:直接安装的git 缺少配置文件 解决步骤: 1、下载配置文件 cd ~/ git clone https://github.com/git/git.git 2、复制git配置文件 cp ~/git/contrib/completion/git-completion.bash ~/.git-co
阅读全文
随笔分类 - Git
摘要:Git版本升级(查看版本信息 git version) 旧版本:git version 1.8.3 新版本:git version 2.30.0 一、安装依赖包: 1、下载安装 libiconv-1.14.tar.gz wget http://ftp.gnu.org/pub/gnu/libiconv
阅读全文
摘要:在执行git pull的时候,提示当前branch没有跟踪信息:
$> git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
阅读全文
摘要:在没有git add之前:
#撤销所有更改
git checkout .
#撤销指定文件的更改
git checkout -- myfile.txt
阅读全文
摘要:假定当前分支下,abc/123.txt需要从git仓库中删除:
git rm -r --cached abc/123.txt //删除abc目录下的123.txt文件,如果要删除abc目录,使用命令:git rm -r --cached abc
git commit -m "删除abc目录下的123.txt文件"
git push
阅读全文
摘要:1、查看本地分支:git branch
2、查看远程分支:git branch -r 或 git branch --remote
3、查看本地和远程的所有分支:git branch -a
阅读全文