Version Control Systems – Git and Friends
History of VCS
Screenshot of an OSX Finder window showing multiple versions of the same file in a list with names from project, project-2 all the way to project-final-final-this-one-actually and project-final-final-this-one-actually_LAST_ONE
Since we started using computers we needed ways of keeping track of our files and data stored on them. You are probably guilty of the above basic but functional approach to versioning changes to files.
Software Development at the end of the day is working with a large number of files and code. Unsurprisingly the industry as a whole has developed sophisticated systems to aide the management of all this data.
The prevailing "winner" when it comes to VCS is Git (opens in a new tab). Developed by Linus Torvalds through his work with others on the Linux kernel, it is now an industry standard. Check out this article (opens in a new tab) for a brief history of how the industry landed on using Git.
A lot of the time when working on code you end up with a bunch of generated files that you don't actually want to keep track of in your version control system. That's where
.gitignore files come in which allow you to specify folders/dirs or specific files to be ignored by the Git VCS mechanisms.
.gitignore file for this site looks like this -
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store *.pem .vscode # debug npm-debug.log* yarn-debug.log* yarn-error.log* # local env files .env.local .env.development.local .env.test.local .env.production.local # vercel .vercel public/feed.xml
Some useful links and utilities for this:
- https://help.github.com/articles/ignoring-files/ (opens in a new tab)
- https://www.atlassian.com/git/tutorials/saving-changes/gitignore (opens in a new tab)
- Create useful .gitignore files for your project, https://gitignore.io (opens in a new tab)