TL;DR:
If you haven’t gotten Git yet, get Git here.
git init git status git add . git commit -m "Your commit message here" git reset
Git, Short and Sweet
Ok, I’m going to do a Git post. Why is my Git post better than any other Git post out there? I’m going to keep it short and simple. This would have been super handy for me to have when I first started using it, so hopefully this format will work for you as well, if you’re a beginner. If you want in-depth explanations and advanced usage, I’ll have a post about that a little later on. Anyways, here goes:
Git is a versioning control system. What that means is you can revert your code to any saved point in time you want to. There’s a TON of stuff you can do with it, and you should start using it right now if you want to be taken seriously.
Download it here. Follow the installation instructions and all that jazz.
Next:
Right-click in the directory where you want a Git repository at, click “Git bash here” from your context menu. In less fancy terms, a Git repository is essentially a folder structure that Git uses to track all your changes. The repository should be at the root of your project, and you should “commit” your work often (save it into the repository using git commit). These are the commands you need to learn:
// Initialize a local repository git init //Show me what files are not in the //repository yet and what changes //need to be added git status //add all those files for me git add . //Save it will ya? git commit -m "Your message here" //your message here is for later //when you might need to revert //back to on older state //I can't figure out what I did wrong. //I've edited way too many files. //Let's just start over at my last commit. git reset
Good enough?
Well, was that short enough? Download it and play around with those commands a little bit. Yea, yea, I know there are so many other things we can do with Git, but if you know what those are, this post isn’t meant for you. Be patient Grasshopper, in due time will you be content with my content.