View on GitHub

Computer Architecture and Operating Systems

Course taught at Faculty of Computer Science of Higher School of Economics

Using Git and GitHub

Reference on Git is available here.

Creating a repository

  1. Login into GitHub or create an account.

  2. Add your public SHH key to your account.

  3. Create a new private repository.

  4. Add the lecturer, the workshop instructor, and the teaching assistant as collaborators to the project. Here is an example of a link to do this (Project > Setting > Manage Access):
    https://github.com/<your account>/<your project>/settings/access.

Working with the repository

  1. Clone the created repository to your machine:
    git clone https://github.com/andrewt0301/test.git
    
  2. The repository will be cloned in the test folder. Change the current directory to it:
    cd test
    
  3. See help of using Git:
    git help
    
  4. Set your user name and email for this repository:
    git config user.name Andrei Tatarnikov
    git config user.email andrewt0301@gmail.com
    
  5. Create or copy the hello.c program to this folder.

  6. Check the status of files in the Git repository:
     git status
    
  7. Add the hello.c file to the commit:
     git add hello.c
    
  8. Send the commit to the repository:
     git commit -s -m "hello.c is added"
    
  9. Update the remote repository (GitHub):
     git push origin main
    
  10. Get changes from the remote repository (GitHub): ```bash git pull