Read-Only Git Access Available
posted by Stephan Brumme
What Is Git ?!If you don't know
gitgrab one of tutorials on the web.
Using My Git RepositoriesI added a git repository to these projects on create.stephan-brumme.com that already came with a big yellow download button, e.g.:
git clone http://create.stephan-brumme.com/crc32/.git
You have read-only access via http and any push will produce an error message.
Whenever I update my projects (bugfixes, enhancements, ...), you can get the latest version:
# update local repository git pull
How To Add Git Repositories To Your WebsiteThe workflow is actually pretty simple.
# go to the project directory cd crc32 # create repository, will be stored in .git sub-directory git init # prepare files for the repository git add Crc32.cpp git add Crc32.ino git add Crc32Best.ino # of course you can use wild-cards, too # commit these added files git commit -m "version 1" # add web server's URL git remote add origin http://create.stephan-brumme.com/crc32/.git # compress repository git gc --aggressive
.gitsub-directory to your web server - just like you would copy HTML files. Done !
Note: A more sophisticated approach is to clone the repository from your local machine to your web server. However, if you are on a shared hoster then chances are good that
gitis disabled. Therefore I suggest you stick with FTP.