With the creation of a new git repo, I want to know what works best. The ether creates the git repository locally and is pushed, or remotely, and pulled out. ,
Method 1
Local computer (inside any project folder)
git init
git add .
git commit -m 'initial commit'
git remote add origin <server-repo-url>
git push
Or is it better to configure the repo on the server and then fetch it to the local computer?
Method 2
Remote server
mkdir myrepo.git
cd myrepo.git
git --bare init
Or does it even matter?
source
share