ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

git 操作清单

git 操作清单

git 命令

1、大文件管理

git lfs install
git lfs track "*.dll"

2、换行符转换禁用

git config --global core.autocrlf false

3.创建空白分支

git checkout --orphan 

4.更换远程仓库地址

git remote set-url origin ssh地址/https地址

5.增加子仓库配置

git submodule add -b 子仓库分支(develop) 子仓库地址(git@gitlab.com:XXXX/sub.git) 主仓库中的子仓库目录路径(ThirdParty)

6.克隆/切换分支同步拉取子仓库

git clone --recurse-submodules git@gitXXX.com
git checkout branch_name --recurse-submodules 

7.主仓库中仅拉取/更新子仓库命令

git submodule update --remote --recursive

配置文件

1、忽略提交

# ---> C++
# build
cmake-build-debug/
cmake-build-release/# JetBrains
.idea/# doc
.def# Prerequisites
*.d# Compiled Object files
*.slo
*.lo
*.o
*.obj# Precompiled Headers
*.gch
*.pch# Fortran module files
*.mod
*.smod# Compiled Static libraries
*.lai
*.la
返回列表