Lesson 2
Last updated
Last updated
A version control system provides an automatic way to track changes in software projects, giving creators the power to view previous versions of files and directories, develop speculative features without disrupting the main development, securely back up the project and its history, and collaborate easily and conveniently with others.
In addition, using version control also makes deploying production websites and web applications much easier.
As a result, fluency in at least one version control system is an essential component of being a developer
Version control has evolved considerably over the years. The family line leading to Git includes programs called RCS, CVS, and Subversion, and there are many current alternatives as well, including Perforce, Bazaar, and Mercurial. Once you commit to a VCS its hard to switch to another. The most popular VCS right now is Git. Its open source and many sites like Github and Bitbucket support it.
Git allows groups of people to work on the same documents (often code) at the same time, and without stepping on each other's toes. It's a distributed version control system. It allows people to collaborate on different features at the same time, on the same code base, without disrupting the other person's workflow.
If you are working in a team, then its very important to use a VCS, like Git. When merging code, conflicts can arise.
If you are working solo on a project, its still good to think about using Git, because your project may expand and others could join later.
We’ll start by pushing our project up to Github, a site designed to facilitate collaboration with Git repositories.
For repositories that are publicly available, GitHub is free, so we’ll plan to make our website’s repo public to take advantage of this.
GitHub charges for private repositories, but there are alternatives like Bitbucket and Gitlab
Over time, releasing projects publicly on GitHub serves to build up a portfolio, which is one good reason to make as much work public as possible.
Signup for github
Create a repo called website
Setup SSH/HTTPS
Push a index.html file
With contents of
Name
College Name
Course name
Create a branch called about-me
create about.html
push branch to Github.
Submit PR
Merge PR
browse to http://<username>.github.io/website
add link to about page in website
on the about page, add a link back
Set up Git
setup git on your machine -
try to clone your own repo, and try to follow some commands like commit, push etc
On Github
Add everyone at your table to your repo
Pick one repository from your table that you have not contributed to before
Create new file with branch
Create PR
Bonus
Create a PR in the index.html to link to your new file with a <a> tag.