Pro Git 2.1.20:从入门到精通的Git指南

需积分: 9 0 下载量 127 浏览量 更新于2024-07-17 收藏 7.85MB PDF 举报
"Pro Git - Version 2.1.20" 是一本由 Scott Chacon 和 Ben Straub 合著的经典著作,专为深入理解和学习 Git 版本控制系统设计。这本书适合从初学者到专业开发者,无论你是想掌握基本操作还是探索高级主题,都能在此找到所需内容。 本书的结构从入门到精通,首先介绍了Git的历史和核心概念,让读者对版本控制有全面了解。它涵盖了Git的基础操作,如安装、配置、命令行交互、获取和管理仓库、记录和查看提交历史、撤销操作、创建和合并分支等,这些都是Git日常开发中必不可少的技能。 随后,书中探讨了分布式Git的特点,包括分布式工作流程、向项目贡献代码、维护项目以及如何利用GitHub这个流行的代码托管平台进行协作。章节中还涉及了Git工具的高级用法,如选择修订版本、交互式暂存、搜索和重写历史,甚至包括调试、子模块、凭证管理和自定义配置等内容。 对于开发者关心的Git与其他系统集成,如作为客户端的Git使用、迁移项目到Git,以及Git的底层原理,如命令结构、对象模型、引用和传输协议都有详尽的讲解。附录部分提供了不同开发环境中使用Git的实际案例,如Visual Studio、Eclipse和Bash中的Git集成。 "Pro Git V2.1.20"是一本全面且深入的Git教程,无论是为了个人学习还是团队协作,都是提升Git技能的宝贵资源。通过阅读这本书,读者将建立起坚实的Git基础,并能灵活运用这一强大的工具来管理复杂的软件开发项目。

Traceback (most recent call last): File "F:\conda\envs\yolov5\lib\site-packages\git\__init__.py", line 89, in <module> refresh() File "F:\conda\envs\yolov5\lib\site-packages\git\__init__.py", line 76, in refresh if not Git.refresh(path=path): File "F:\conda\envs\yolov5\lib\site-packages\git\cmd.py", line 392, in refresh raise ImportError(err) ImportError: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh() All git commands will error until this is rectified. This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning - error|e|raise|r|2: for a raised exception Example: export GIT_PYTHON_REFRESH=quiet The above exception was the direct cause of the following exception: Traceback (most recent call last): File "E:\yolov5-master\train.py", line 67, in <module> GIT_INFO = check_git_info() File "F:\conda\envs\yolov5\lib\contextlib.py", line 79, in inner return func(*args, **kwds) File "E:\yolov5-master\utils\general.py", line 360, in check_git_info import git File "F:\conda\envs\yolov5\lib\site-packages\git\__init__.py", line 91, in <module> raise ImportError("Failed to initialize: {0}".format(exc)) from exc ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh() All git commands will error until this is rectified. This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning - error|e|raise|r|2: for a raised exception Example: export GIT_PYTHON_REFRESH=quiet

2023-06-11 上传

Traceback (most recent call last): File "C:\Users\GL\.conda\envs\pytorch\lib\site-packages\git\__init__.py", line 89, in <module> refresh() File "C:\Users\GL\.conda\envs\pytorch\lib\site-packages\git\__init__.py", line 76, in refresh if not Git.refresh(path=path): File "C:\Users\GL\.conda\envs\pytorch\lib\site-packages\git\cmd.py", line 392, in refresh raise ImportError(err) ImportError: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh() All git commands will error until this is rectified. This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning - error|e|raise|r|2: for a raised exception Example: export GIT_PYTHON_REFRESH=quiet The above exception was the direct cause of the following exception: Traceback (most recent call last): File "E:\eclipse workspace\yolov5-master\train.py", line 72, in <module> GIT_INFO = check_git_info() File "C:\Users\GL\.conda\envs\pytorch\lib\contextlib.py", line 79, in inner return func(*args, **kwds) File "E:\eclipse workspace\yolov5-master\utils\general.py", line 360, in check_git_info import git File "C:\Users\GL\.conda\envs\pytorch\lib\site-packages\git\__init__.py", line 91, in <module> raise ImportError("Failed to initialize: {0}".format(exc)) from exc ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh() All git commands will error until this is rectified. This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning - error|e|raise|r|2: for a raised exception Example: export GIT_PYTHON_REFRESH=quiet

2023-07-10 上传