Git - remove git tracking directory

0 votes
546 views
added Jan 9, 2025 in Git by lcjr Lieutenant (12,520 points)
cd ~/Projects/YOURPROJECT

rm -rf .git

// After running this command, the project will no longer be a Git repository. If you list the files in the directory, you won't see the .git folder anymore:
ls -a

 

1 Response

0 votes
responded Jan 9, 2025 by lcjr Lieutenant (12,520 points)

Then, you can remove the directory by: 

cd ..

// check the directory
ls

//remove directory
rm -rf YOURPROJECT

// recheck the directory
ls

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...