Skip to content

2. Git & GitHub

NadavT edited this page Apr 2, 2022 · 21 revisions

[TO ADD: short explanation of what Git and GitHub are and why it's useful]

Basic setup


  1. Download & install git.

  1. Create a github.com user.
  2. As a student, you are entitled to GitHub pro. Go to your user's settings, upload the required documents and get it :)
  3. When collaborating, one member of the pair should create a new repository, named, for example, matam-hw1. [SHOULD RECOMMEND TO ADD .gitignore?]
  4. That person should invite their partner to collaborate, by going to the repository's settings -> collaborators -> add people.
  5. [TO ADD: change settings in the repo (require CR, no pushing to main)

Advanced features

Pull request

[TODO: Add explanation of pull requests].

Branch protection

In order to avoid pushing to master/main by mistake it is recommended to add a branch protection rule to this branch like so: image

The common protection to enable is Require a pull request before merging

Clone this wiki locally