Skip to content

keyuancy/git_assignment

 
 

Repository files navigation

Git and GitHub

Contents

Description

This module explores version control with Git and GitHub, and how it connects to the ethical discussions of reproducibility. Participants will set up Git and create and use repositories, including recording, viewing and undoing changes. You will also learn how to create branches and collaborate with others with shared branches. This module also introduces more advanced commands such as de-bugging and history editing.

Throughout the entire module, participants will learn how to problem solve through live coding. You will also learn about reproducibility and how to centre it within your work. ants will be able to:

  • Use Git to collaboratively save, restore, and update work through version control
  • Explain the difference between Git and GitHub

Activities

This module has two types of activities.

  1. Assignments are mandatory, and form part of your evaluation. earning Support!

Assignments

Participants should review the Assignment Submission Guide for instructions on how to complete assignments in this module.

Assignments are typically due on the Sunday following the module's live learning session.

  1. [Git Assignment](./02_activi [email protected]
  • *Pedram Asli  

Git Assignment -

Questions and Answers

a. What is an issue?

An issue is a way to track tasks, enhancements, bugs, or other requests in a GitHub repository. It allows users to discuss and manage project work.

b. What is a pull request?

A pull request (PR) is a request to merge code changes from one branch into another. It allows for code review, discussion, and automated testing before integration.

c. Describe the steps to open a pull request:

  1. Push your branch with changes to GitHub.
  2. Go to the repository on GitHub.
  3. Click on the "Pull requests" tab.
  4. Click "New pull request."
  5. Select your branch and compare it with the base branch (e.g., main).
  6. Add a title and description, then click "Create pull request."

d. Describe the steps to add a collaborator to a repository (share write permissions):

  1. Go to the repository on GitHub.
  2. Click on the "Settings" tab.
  3. Click on "Collaborators & teams."
  4. Under "Collaborators," type the username of the person you want to add.
  5. Click "Add collaborator" and then confirm.

e. What is the difference between git and GitHub?

Git is a version control system used to track changes in code. GitHub is a platform that hosts Git repositories online, allowing for collaboration and sharing.

f. What does git diff do?

The git diff command shows the differences between changes made in the working directory and the index or between two commits.

g. What is the main branch?

The main branch (often named main or master) is the default branch where the stable and production-ready code is usually maintained.

h. Besides our initial commit if it is a new repository, should we directly push our changes directly into the main branch?

It is generally a good practice to create separate branches for different features or fixes and use pull requests to merge changes into the main branch to ensure code review and maintain stability.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 89.4%
  • CSS 10.6%