Domain 2: Working with GitHub Repo's - Deck 1 Flashcards
Branch
A parallel version of your code that is contained within the repository, but does not affect the primary or main branch.
To download a full copy of a repository’s data from GitHub.com, including all versions of every file and folder.
Clone
A new repository that shares code and visibility settings with the original “upstream” repository.
Fork
To take the changes from one branch and apply them to another.
Merge
A request to merge changes from one branch into another.
Pull request (PR)
A repository stored on GitHub, not on your computer.
Remote
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.”
Upstream
what are good components in a README file communicate expectations for your project and helps you to manage contributions.
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.
the first item a visitor will see when visiting your repository
A README
What does a README file typically include
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
If the README file is put in these three places
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.
If a repository contains more than one README file, then the file shown is chosen from locations in the following order:
- the
.github
directory - the repository’s
root
directory - the
docs
directory
Steps to create a new repository
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:
Steps to create a template repository
- On GitHub.com, navigate to the main page of the repository.
- Under your repository name, click Settings:
- Select Template repository:
Steps to clone a repository
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:
- On GitHub.com, navigate to the main page of the repository.
- Above the list of files, click Code.
- Copy the URL for the repository:
CleanShot-2024-03-09-at-11.48.38
- Open Terminal
- Change the current working directory to the location where you want the cloned directory.
- Type
git clone
, and then paste the URL you copied earlier: