Essentially I’m looking to use git as a download command. I have a project on a centralized server and I’d like to set up an easy way download the project. I would assume that I can set up a git repo on the server and then run git clone locally and that will work but my knowledge and understanding of git is severely lacking apparently. Here is what I’m:
in the directory on the server I run:
// set up the git repo in directory named test
git init
git add .
git commit -m "add are all the files"
then locally I should be able to run git clone http://path/to/directory/test.git (according to the specifications of the host)
But this just gives me an empty repo. I’ve looked at several tutorials but there seems to be a leap between the intro tutorials and doing what I want to do. What am I missing?
There seem to be a lot of questions so I created a chat room: https://chat.stackoverflow.com/rooms/5635/creating-a-git-repo-to-clone-from
On your server, create a “bare” repo (one without a local working copy)
Then on your client, bootstrap your repo, and push it
Once you’ve done that, other clients will be able to do a