用户名和邮箱配置
$
git
config [--global] user.name = <username>
$
git
config [--global] user.email = <useremail>
如果省略--global选项,配置只对当前仓库生效
否则就对当前用户的所有仓库有效
就近原则,本地配置比全局配置的优先级更高
获取详细帮助信息
$
git
help <cmd>
$
git
<cmd> --
该脚本旨在使项目维护人员更轻松地检出
Git
Hub PR
分支
(包括来自外部贡献者派生的
分支
),以便维护人员可以将更改推送到
分支
,然后又将其推回PR。
它以
Git
Hub PR URL或只是PR编号作为唯一参数,然后进入运行它的克隆中,从PR贡献者的
分支
中检出相应的
分支
。
仅提供一个PR编号,它假定您具有upstream或origin远程,并使用该远程URL推断PR提交给哪个回购。
如果远程服务器具有
Git
Hub SSH URL,则它将对
分支
使用SSH URL,这假定您具有对贡献者
分支
的写权限。
检出PR
分支
如果您当前的目录位于
Git
Hub whatwg/html库的克隆中,请查看PR#1871的
分支
:
仅使用PR号码的示例
gpr 1871
使用PR URL的示例
gpr https://
git
hub.com/whatwg/html/pull/1871
您应该看到类似于以下的输出:
Getting data for whatwg/html PR #1871...
Author: estark37 (Emily Stark)
Title: Honor srcdoc docume
sudo apt update # 更新源
sudo apt install software-properties-common # 安装 PPA 需要的依赖
sudo add-apt-repository ppa:
git
-core/ppa # 向 PPA 中添加
git
的软件源
su...
你可以使用
Git
命令来
拉取
最新代码到本地。首先,你需要在本地安装
Git
,并且在你的项目中初始化
Git
仓库。然后,使用以下命令
拉取
最新代码:
git
pull origin master
这将从远程仓库的 master
分支
拉取
最新代码到你的本地仓库。如果你想
拉取
其它
分支
的代码,只需要将 master 替换为你想要
拉取
的
分支
名称即可。
java.time.format.DateTimeParseException: Text ‘2022-03-18 14:13:38‘ could not be parsed at index 10
19169