Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change git repo's owner?

Tags:

git

I used the root user to init, add, and commit git repo. (bad habit)
Now, I create a new normal user me.
How to let me to handle the repo made by root?

like image 339
kittygirl Avatar asked Jan 22 '26 12:01

kittygirl


1 Answers

Use:

sudo chown user[:group] . -R

from within the repositories folder to change the owner, where user is the desired user (and optionally a group name may also be supplied).

like image 187
weeska Avatar answered Jan 24 '26 06:01

weeska



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!