git 常用技巧

安装 git

$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt upgrade

添加 submodule

$ git submodule add
$ git pull
$ git submodule init  # 初始化仓库中增加的子模块
$ git submodule update # clone 增加的新子模块
git submodule update --init --recursive

从 data 目录中删除所有不需要的文件历史

git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch data/" HEAD

Git: gnutls_handshake() failed: Error in the pull function

sudo apt install build-essential nghttp2 libnghttp2-dev libssl-dev

"Fatal: Not possible to fast-forward, aborting"

git pull --rebase

results matching ""

    No results matching ""