Working With Version Numbers
What is the best way to use version numbers with Git/GitHub? I understand that when you make a commit, all previous versions are “snapshotted” so they can be retrieved. But how can you make that coincide with application/assembly version numbers?
For instance, say you have
version: 126.96.36.199 and you commit it. Then you have
version 188.8.131.52 and commit that. So on and so forth.
- GIT push creates a temporary (?) “file.html~” file of my commited file? Why?
- Can't authenticate to a github repo which I own
- Git branches and merging back
- Checkout an older commit and create a new master branch?
- How do show my tests passing/failing in Github?
- How to modify my git workflow now that I created github pages?
version 184.108.40.206 and you want to pull the code from
version 220.127.116.11. What’s the easiest way to do that with Git/GitHub?
One Solution collect form web for “Working With Version Numbers”
The best way is to use tags. Tags are like a pointer to a specific version that never changes. Create a tag like this:
git tag -a version-18.104.22.168
The above creates a tag at the current commit. (Refer to the documentation for how to create a tag pointing to a previous commit.) Push the tags to Github with:
git push origin --tags