Ok I have a project in a folder called mywebsite which is located in my documents folder on my mac. How do I use git to version control this folder??
Every time I try something I end up with a fatal error of some sort and it's really annoying me now, can you help?
I do git init, then mkdir and then I've tried adding and cloning the files to no avail.
git init
git mkdir mywebsite
cd mywebsite
git clone file://localhost/Users/me/Documens/sites/mywebsite
fatal '/Users/me/Documens/sites/mywebsite' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Please help!
If you have already files in 'mywebsite':
cd /Users/me/Documens/sites/mywebsite
git init . # note the final '.'
then do a git status to see what needs to be added.
git add .
git status # check what has been added
git commit -m "first commit"
If you haven't any file yet, you can:
cd /Users/me/Documens/sites/
git init mywebsite
cd mywebsite # you are now in an empty git repo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With