Pro Git 2nd Edition 2.1.413installed and available. So we will expect you to know how to open Terminal in macOS or Command Prompt or PowerShell in Windows. If you don’t know what we’re talking about here, you may need to stop Terminal the very first time. $ git --version If you don’t have it installed already, it will prompt you to install it. If you want a more up to date version, you can also install it via a binary the Git server will ask you for your username and password for authentication. By default it will prompt you on the terminal for this information so the server can tell if you’re allowed to push. If you0 码力 | 731 页 | 21.49 MB | 1 年前3
Pro Git 2nd Edition 2.1.413installed and available. So we will expect you to know how to open Terminal in macOS or Command Prompt or PowerShell in Windows. If you don’t know what we’re talking about here, you may need to stop the Terminal the very first time. $ git --version If you don’t have it installed already, it will prompt you to install it. If you want a more up to date version, you can also install it via a binary installer the Git server will ask you for your username and password for authentication. By default it will prompt you on the terminal for this information so the server can tell if you’re allowed to push. If you0 码力 | 501 页 | 17.96 MB | 1 年前3
Pro Git 2nd Edition 2.1.413 installed and available. So we will expect you to know how to open Terminal in macOS or Command Prompt or PowerShell in Windows. If you don’t know what we’re talking about here, you may need to stop Terminal the very first time. $ git --version If you don’t have it installed already, it will prompt you to install it. If you want a more up to date version, you can also install it via a binary the Git server will ask you for your username and password for authentication. By default it will prompt you on the terminal for this information so the server can tell if you’re allowed to push. If you0 码力 | 691 页 | 13.35 MB | 1 年前3
Pro Git 中文版 第2版 2.1.66所有 人一定会有命令行工具。 21 假如你是 macOS 用户,我们希望你懂得如何使用终端(Terminal);假如你是 Windows 用户,我们希望你懂 得如何使用命令窗口(Command Prompt)或 PowerShell。 如果你尚未掌握以上技能,我们建议你先停下来 快速学习一下,本书中的讲述和举例将用到这些技能。 安装 Git 在你开始使用 Git 前,需要将它安装在你的计算机上。 子命令、命令行参数、以及远程仓库与引用名。 这项功能也可以用于你自己定义的提示符(prompt),显示当前目录下 Git 仓库的信息。 根据你的需要,这个 信息可以简单或复杂,这里通常有大多数人想要的几个关键信息,比如当前分支信息和当前工作目录的状态信 息。 要添加你自己的提示符(prompt),只需从 Git 源版本库复制 contrib/completion/git-prompt.sh 文件到你的 Home 目录(或其他便于你访问与管理的目录), 面这样: 462 . ~/git-prompt.sh export GIT_PS1_SHOWDIRTYSTATE=1 export PS1='\w$(__git_ps1 " (%s)")\$ ' \w 表示打印当前工作目录,\$ 打印 $ 部分的提示符(prompt),__git_ps1 " (%s)" 表示通过格式化参数 符(%s)调用`git-prompt.sh`脚本中提供的函数。 因为有了这个自定义提示符,现在你的0 码力 | 501 页 | 19.30 MB | 1 年前3
Pro Git 中文版 第2版 2.1.66假如你是 macOS 用户,我们希望你懂得如何使用终端(Terminal);假如你 是 Windows 用 户 , 我 们 希 望 你 懂 得 如 何 使 用 命 令 窗 口 ( Command Prompt)或 PowerShell。 如果你尚未掌握以上技能,我们建议你先停下来 快速学习一下,本书中的讲述和举例将用到这些技能。 安装 GIT 在你开始使用 Git 前,需要将它安装在你的计算机上。 这项功能也可以用于你自己定义的提示符(prompt),显示当前目录下 Git 仓 库的信息。 根据你的需要,这个信息可以简单或复杂,这里通常有大多数人 想要的几个关键信息,比如当前分支信息和当前工作目录的状态信息。 要添 加 你 自 己 的 提 示 符 ( prompt ) , 只 需 从 Git 源 版 本 库 复 制 contrib/completion/git-prompt.sh 文件到你的 Home 里添加这个文件路径,类似于下面这 样: . ~/git-prompt.sh export GIT_PS1_SHOWDIRTYSTATE=1 export PS1='\w$(__git_ps1 " (%s)")\$ ' \w 表示打印当前工作目录,\$ 打印 $ 部分的提示符(prompt),__git_ps1 " (%s)" 表示通过格式化参数符(%s)调用`git-prompt.sh`脚本中提供的函数。 因为有了这个自定义提示符,现在你的0 码力 | 670 页 | 13.59 MB | 1 年前3
共 5 条
- 1













