I write about science and technology, mostly. I live in the Port Stephens area in Australia and love my garden.
git add name_of_file_you_worked_on
git commit -m message_saying_what_you_did
That’s it.
If you want different versions of your work to switch between:
git checkout -b name_of_branch
git checkout main
git checkout name_of_branch
That’s it. You can have as many branches as you want.
If you want to save your work elsewhere e.g. github, private server
git remote add name_of_remote_repository http://address_of_remote.com/name_of_remote_repository
git push name_of_remote_repository
git pull name_of_remote
or
git fetch name_of_remote
then when ready: git pull name_of_remote
That’s it. That’s git. If you don’t love using the command line, try one of these:
Sublime Merge Git Kraken Tortoise Git GitG GitK
Or your IDE likely has a version control feature.
They all run those commands, but with a visual interface, which can be nice.
Other alternatives to git include Mercury (hg), bazaar, and older systems like subversion (SVN)