Git and Github

In this lesson we will setup and use git to track changes and recover earlier states in a project. We will link our local git project to github to create a long-lasting and sharable record of the project.

Terminology

Setting up a new Github repository

Start a linked project on your local computer

Make a webpage for your repository

Commit the changes to project and push to Github

Host your “index” on Github pages

Git workflow

All of these commands are implemented in the terminal

Check the status of your project and make sure you are up-to-date with the remote repository

  • git status- provides details of the current project status
  • git pull - pulls down any changes from the github repository – Note that you can work on the same project on different computers, as long as you are careful to push and pull changes throught your github repository.

Do some work and commit it to the timeline

Reviewing the commits in your repro

Amending a commit

For small changes

Change the git message

Delete a commit

Recover a file from an earlier commit

Branching