无法访问 .zshrc 文件或终端中的 .bashrc 中的终端别名/快捷方式,File/folder 权限问题

unable to access terminal alias/ shortcuts in .zshrc file or .bashrc in terminal, File/folder permission issue

在 mac 上,它曾经用于工作文件,但最近它不允许我在终端中使用别名/快捷方式

我已经为 git add 创建了别名。 =一个。 git checkout -b = co -b 但是现在除非我指定 sudo 和 full git add 。命令我不能运行命令。

此外,对于任何命令,我总是必须使用 sudo,而以前不是这样。

projectFolder/.git: 权限被拒绝

除非我执行 sudo 和完整的 git init 命令,否则它不起作用。

由于您有权访问 sudo,因此您应该能够将所有树恢复到您的帐户:

sudo chown -R jay /Users/jay

只要您在树中将 root 视为用户(ls -alrth),您确实需要 sudo。