USERNAME is you
MYPROJECT is the name of your project
Create a MYPROJECT repository on GitHub but don't include ANY files (not even README.md or .gitignore). Then in a local directory create your local repository from the commandline.
mkdir MYPROJECT
cd MYPROJECT/
git init
git commit --allow-empty -m "Initial commit"
git tag -a v0.0.0 -m "Initial commit"
git remote add origin https://github.com/USERNAME/MYPROJECT.git
(might ask for username and password)
git push -u --follow-tags origin master
Add and modify files to the workspace. Add the files to the index:
git add .
Commit your changes from index to local repository
git commit -m "Commit some changes"
Get the SHA1 of the last commit and copy the beginning part its hash line.
git log
Produces: c15c9a5076803b497156bcf0b39cd5422728b4bf
Create a tag of v0.1.0 for commit that starts with c15c9a5
git tag v0.1.0 c15c9a5
From remote local repository Master branch to origin GitHub Master branch
git push origin master
Git does not push tags by default. You will have to explicitly push tags to a shared server after you have created them. To push a single tag to origin run:
git push origin [tagname]
To push all of your tags not on origin server run:
git push origin --tags