1

On mac, it used to work file but recently it doesnt allow me to use the alias /shortcuts in the terminal

I have created the alias for git add . = a . git checkout -b = co -b But now unless I specify sudo and full git add . command i can't run the command.

Also for any command I always have to use sudo which wasn't the case before.

projectFolder/.git: Permission denied enter image description here

enter image description here

enter image description here

enter image description here

Unless I do sudo and full git iniit command it doesnt work. enter image description here

JP.
  • 1,035
  • 2
  • 17
  • 39

1 Answers1

0

Since you have access to sudo, you should be able to chown your all tree back to your account:

sudo chown -R jay /Users/jay

As long as you see root as a user in your tree (with ls -alrth), you would need sudo indeed.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • It says: " : Operation not permitted " – JP. May 18 '17 at 13:32
  • @JP. Sorry, I forgot the sudo. See my edited answer. – VonC May 18 '17 at 14:24
  • How can i create a shortcut / alias so that i can give this permission to my current folder or pwd folder. ? – JP. May 20 '17 at 17:02
  • @JP. See http://stackoverflow.com/a/5573447/6309. You don't need pwd. Your alias would execute itself in the current directory anyway. But if you must have pwd: https://unix.stackexchange.com/a/39835/7490 – VonC May 20 '17 at 19:40