In the command prompt navigate to the network share directory making sure all required permissions are set and issue the following command.
git init
Next create a dummy file e.g. a README.txt file in the remote repository and commit this file.
git add -A
git commit -m 'Initial cimmit'
This will make the repository a non empty non bare repository and force the creation of the master branch. Now navigate to your local folder and clone the remote repository with the following command.
git clone "network share directory/working directory"
Navigate back to the remote repository and set the following config
git config --bool core.bare true
Now you can resume normal business by working in your local folder and when ready to commit to the remote repository, do the following
git add -A
git commit -m 'Added some good code'
git push origin master
Happy coding!!!.
No comments:
Post a Comment