git在macOS环境下的安装与配置(小白版)_apple git 设置(1)

(1)键入

install git

显示如下

Error: Insufficient privileges to write to MacPorts install prefix.

说明你的 MacPorts shell 模式并未以超级用户权限执行,因此无法安装软件包。
(MacPorts shell 是一个交互式命令行环境,它允许你直接执行 MacPorts 命令,无需在每条命令前添加 port。
当你在命令行中只输入 port 并按下回车键时,你就进入了 MacPorts shell。在这个环境中,你可以直接输入 MacPorts 命令,例如 install git,而无需添加 port,即不需要写成 port install git。
这种情况说明你在 MacPorts shell 中遇到了权限问题,这可能意味着这个 shell 没有以超级用户权限(sudo)运行
。)
在这种情况下,你可以选择退出 MacPorts shell 模式并在常规的命令行中执行安装命令。在 MacPorts shell 中输入 quit 来退出,然后在常规的命令行中输入 sudo port install git 来安装 git。

(2)键入

sudo port install git

显示如下

Password:
—> Computing dependencies for git

表示 MacPorts 正在计算安装 git 所需的依赖包。MacPorts 将会自动处理这些依赖关系,安装所有必要的软件包。

4. MacPorts会列出的所有为了安装git而需要的依赖库。这个列表看起来可能有些长,但实际上这是正常的。许多包有着相互的依赖关系,为了让git工作,需要确保这些依赖库都被正确地安装。最后显示如下

Continue? [Y/n]:

系统现在问你是否要继续进行。如果你同意安装这些依赖库,你可以输入 Y 然后按回车。

5. 这是你安装git和其它依赖库后,MacPorts提供的一些重要信息和提示。(可以忽略)

—> Some of the ports you installed have notes:
db48 has the following notes:
The Java and Tcl bindings are now provided by the db48-java and
db48-tcl subports.
git has the following notes:
Configuration to enable the osxkeychain credential helper has been added to
the system-wide gitconfig at /opt/local/etc/gitconfig. If you do not wish to
use
this credential helper, you can override this setting in your own personal
git config file ($HOME/.gitconfig) with e.g.

[credential]
helper = some_other_credential_helper

For more information, run

git help credentials
libidn has the following notes:
GNU libidn2 is the successor of GNU libidn. It comes with IDNA 2008 and TR46
implementations and also provides a compatibility layer for GNU libidn.
libpsl has the following notes:
libpsl API documentation is provided by the port ‘libpsl-docs’.
rsync has the following notes:
To use the rsyncd server you must copy /opt/local/etc/rsyncd.conf.example to
rsyncd.conf and add your modules there. See ‘man rsyncd.conf’ for more
information.

A startup item has been generated that will aid in starting rsync with
launchd. It is disabled by default. Execute the following command to start
it, and to cause it to launch at startup:

sudo port load rsync

  • 关于db48:Java和Tcl的绑定现在由db48-javadb48-tcl子端口提供。
  • 关于git:已将启用osxkeychain凭据帮助程序的配置添加到位于/opt/local/etc/gitconfig的系统范围内的gitconfig中。如果你不想使用此凭据帮助程序,你可以在自己的个人git配置文件($HOME/.gitconfig)中覆盖此设置,例如:

[credential]
helper = some_other_credential_helper

如果你需要更多信息,可以运行git help credentials命令。

  • 关于libidn:GNU libidn2是GNU libidn的后继。它带有IDNA 2008和TR46实现,并提供了GNU libidn的兼容层。
  • 关于libpsl:libpsl API文档由libpsl-docs端口提供。
  • 关于rsync:如果你想使用rsyncd服务器,你必须将/opt/local/etc/rsyncd.conf.example复制到rsyncd.conf并在那里添加你的模块。关于更多信息,可以参阅man rsyncd.conf
    一个启动项已生成,将有助于使用launchd启动rsync。默认情况下,它是禁用的。执行以下命令以启动它,并使它在启动时加载:

sudo port load rsync

6. 现在你已经在你的macOS上通过MacPorts安装了git,所以你应该能够在命令行中使用它。你可以通过打开终端并键入git --version来检查它是否已正确安装。如果你看到git的版本号,那么git应该已经可以使用了。

7. 克隆远程仓库:这是将远程仓库复制到本地的操作。命令格式为:git clone [url]。例如:

git clone https://gitee.com/your_username/your_repository.git

“https://gitee.com/username/repo.git”(其中,“username” 是你的 Gitee 用户名,“repo” 是你的仓库名)
如果你想克隆 GitHub 上的一个项目,可以使用

git clone https://github.com/user/repo.git。

现在你的Gitee仓库应该已经被克隆到你的本地目录了。你可以通过cd命令进入到那个目录,并使用git status命令查看仓库状态。

接下来会让你输入账户名和密码

Username for ‘https://gitee.com’:

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数大数据工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年大数据全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上大数据开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新

如果你觉得这些内容对你有帮助,可以添加VX:vip204888 (备注大数据获取)
img

正体系化!**

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新

如果你觉得这些内容对你有帮助,可以添加VX:vip204888 (备注大数据获取)
[外链图片转存中…(img-xUzbEG75-1712518180864)]

  • 26
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值