Git仓库命令 发表于 2024-12-18 更新于 2025-04-20 分类于 程序猿 , git git 仓库常用命令清单,包括git init git clone git log 1 git-init# 创建git仓库git init 它会在当前目录下生成一个.git隐藏目录,表示本地仓库创建成功 2 git-clone# 从远程仓库克隆所有分支git clone <remote-url> [local-name]# 从远程仓库克隆单分支git clone -b <remote-branch> --single-branch <remote-url> 3 git-log# 以单行格式,查看仓库提交历史git log --oneline 参考资料 git-init | git官网 git-clone | git官网 更新日志 20250315:初稿 20241218:创建