macos - 全新安装后设置 git

标签 macos git ssh repository ssh-keys

我打算在我的 macbook pro 上安装山狮并删除硬盘中的所有内容。我目前已经安装了几个 repos 的 git,并且我的 ssh key 也与远程 repos 连接。我不确定如何在全新安装 osx 后恢复所有内容。我对 git 不是很精通,所以我可能需要很多帮助。任何帮助,将不胜感激。谢谢!

最佳答案

我建议备份 完整当前的硬盘驱动器出于安全原因。

对于其他存储库的 SSH 访问,您应该保留您的 ~/.ssh/id_rsa[.pub]手头的文件,因为这是在其他存储库(即 ssh 服务器)中识别自己的关键

repo 显然应该备份。

全新安装后,您必须安装 git,添加 ~/.ssh/id_rsa[.pub]文件,然后您应该正在运行。

关于macos - 全新安装后设置 git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15526839/

相关文章:

macos - 网络链接调节器在 macOS Sierra 上不起作用

shell - FileZilla 打破 rbash 和 scponly chrooting

linux - 使用 Kate 从远程主机打开文件

python - 通过 ssh 运行 python 时,模块似乎未安装

c - MacOS Mojave 中的 C 头文件在哪里?

macos - Homebrew 软件更新错误 : Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

java - KeyAdapter 监听器适用于 Windows,不适用于 Mac

git - 无法 pull ,因为使用 VS2015/Git 有未提交的更改

git - 'git fetch -p'(或--prune)是什么意思

git - 将 Gitlab 与 ReviewBoard 集成 - 文件 Blob 与提交 SHA1