My knowledge of Git is small at the moment, but much greater than it has ever been. I was always very overwhelmed by the concept, but am starting to truly appreciate what it has to offer.
I learned that in the past, companies would really only use verysion control if they had the means to afford it. That is because they had to have massive servers to store, not just the snapshots that we have now, which are really only recording changes, but entire websites worth of code. Many, many times.
The basic pieces of code used in the terminal for Git are:
- Initialize
git init
- Check the status of Git
git status
- Check the changes between committed files and what has to be committed
git diff
- Move files into the 'staging area'
git add
- Commit changes to live
git commit
The basic workflow of Git is
- Initialize Git in the parent directory you're working in.
- Create the files you want Git to watch.
- Manipulate the contents of those files.
- Add those files to the 'staging area'.
- Commit those changes with a brief message saying what you did.
A sucessful commit looks like this
On branch master
nothing to commit, working tree clean
This diagram shows the Git work order: