Domain 2: Working with GitHub Repo's - Deck 1 Flashcards

1
Q

Branch

A

A parallel version of your code that is contained within the repository, but does not affect the primary or main branch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

To download a full copy of a repository’s data from GitHub.com, including all versions of every file and folder.

A

Clone

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A new repository that shares code and visibility settings with the original “upstream” repository.

A

Fork

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To take the changes from one branch and apply them to another.

A

Merge

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A request to merge changes from one branch into another.

A

Pull request (PR)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A repository stored on GitHub, not on your computer.

A

Remote

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The branch on an original repository that has been forked or cloned. The corresponding branch on the cloned or forked branch is called the “downstream.”

A

Upstream

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what are good components in a README file communicate expectations for your project and helps you to manage contributions.

A

A README, along with a repository license, citation file, contribution guidelines, and a code of conduct, communicates expectations for your project and helps you manage contributions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

the first item a visitor will see when visiting your repository

A

A README

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does a README file typically include

A

README files typically include information on:

  • What the project does
  • Why the project is useful
  • How users can get started with the project
  • Where users can get help with your project
  • Who maintains and contributes to the project
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If the README file is put in these three places

A

If you put your README file in your repository’s hidden.github,root, ordocsdirectory, GitHub will recognize and automatically surface your README to repository visitors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

If a repository contains more than one README file, then the file shown is chosen from locations in the following order:

A
  1. the.githubdirectory
  2. the repository’srootdirectory
  3. thedocsdirectory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Steps to create a new repository

A

In the upper-right corner of any page, select the dropdown, then click New repository:
1. Use the Owner dropdown menu to select the account you want to own the repository.
2. Type a name for your repository, and an optional description.
3. Choose a repository visibility. For more information, see “About repositories.”
4. You can create a README, which is a document describing your project.
5. You can create a .gitignore file, which is a set of ignore rules.
6. You can choose to add a software license for your project.
7. Click Create repository:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Steps to create a template repository

A
  1. On GitHub.com, navigate to the main page of the repository.
  2. Under your repository name, click Settings:
  3. Select Template repository:
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Steps to clone a repository

A

Cloning a repository pulls down a full copy of all the repository data that GitHub.com has at that point in time, including all versions of every file and folder for the project.

To clone a repo, follow these steps:

  1. On GitHub.com, navigate to the main page of the repository.
  2. Above the list of files, click Code.
  3. Copy the URL for the repository:

CleanShot-2024-03-09-at-11.48.38

  1. Open Terminal
  2. Change the current working directory to the location where you want the cloned directory.
  3. Typegit clone, and then paste the URL you copied earlier:
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Steps to Create a new branch

A
  1. On GitHub.com, navigate to the main page of the repository.
  2. From the file tree view on the left, select the branch dropdown menu, then click View all branches.
  3. Click New branch:
  4. Under “Branch name”, type a name for the branch.
  5. Under “Branch source”, choose a source for your branch.
  6. Select the branch dropdown menu and click a branch.
  7. Click Create branch:
17
Q

Explain how to add files to a repository

A
  1. On GitHub.com, navigate to the main page of the repository.
  2. Above the list of files, select the Add file dropdown menu and click Upload files. You can also drag and drop files into your browser:
  3. In the “Commit message” field, type a short, meaningful commit message that describes the change you made to the file. If there are multiple authors, you can attribute the commit them here.
  4. Below the commit message fields, decide whether to add your commit to the current branch or to a new branch (best practice is to NOT commit to main, but rather do a PR and merge).
  5. Click Propose changes:
18
Q

How many MB’s of files can you upload to a repo via browser and how many via cli.

A

You can add up to 25 MB files to a repository via a browser. You can add up to 100 MB (each) files via the CLI. You can’t add/upload files to protected branches.

19
Q

how to view repository insights

A

Via the insights tab.

20
Q

What are the stats that you can view from repo insights?

A
  • Pulse - Recent activity (PRs, issues, and so on).
  • Contributors - who’s contributing and their stats.
  • Community Standards - Checks for contributing guidelines files that repository maintainers can set to help collaborators make useful contributions to a project.
  • Commits - Graph of commits over time.
  • Code frequency - Additions/deletions over the history of the repo.
  • Dependency Graph - A list of dependencies and dependents of the repo.
  • Network - Timeline of the most recent commits to this repository and its network ordered by most recently pushed to.
  • Forks - List of forks of the repo.
21
Q

Explain feature previews

A

You can see a list of features that are available in beta and a brief description for each feature. Each feature includes a link to give feedback.

  1. In the upper-right corner, click your profile photo, then click Feature preview:
    2.To view details for a feature, in the left sidebar, click the feature’s name (where you can also enable/disble that feature):