Reputation: 271
I have a folder similar to this:
Hello World
├── Hello World 1.0.py
├── Hello World 2.0.py
├── Hello World 2.1.py
└── Changelog.txt
Where "Changelog.txt" is something like:
2.0: Added a pause at the end.
2.1: Changed pause to os.system("pause").
Obviously this is not the best solution for version control. How can I use Git to organize my project? Ideally, I'd want a folder somewhat like this:
Hello World
├── Hello World.py
└── .git
└── (...)
But I don't want to lose the version numbers and changelog comments.
More information:
I'm completely new to Git. I've looked at similar questions like:
What is git tag, How to create tags & How to checkout git remote tag(s)
What is the Git equivalent for revision number?
How to manage the version number in Git?
But they seem too technical for me right now and it doesn't look like they address my specific problem.
Upvotes: 3
Views: 175
Reputation: 38724
What you need is an introductory course on git. You can find tons of free ones online. Very basic use of git is all you need.
Your "changelog comments" will turn into git commit messages. You can include a "revision number" as part of your commit message if you like.
The git log will be your new changelog.
At this stage the only git commands you need are init
(one time only), add
, commit
, status
and log
.
EDIT:
e.g.
git init
git add .
git commit -m '1.0: first version'
(make changes)
git add .
git commit -m '2.0: Added a pause at the end.'
(make changes)
git add .
git commit -m '2.1: Changed pause to os.system("pause").'
git log
(you will see both a list of all 3 commits along with your messages)
Upvotes: 3