Contribute to an existing repository Flashcards
1
Q
Download a repository on GitHub to our machine.
Replace owner/repo
with the owner and name of the repository to clone.
A
git clone https://github.com/owner/repo.git
2
Q
Change into the repo
directory.
A
cd repo
3
Q
Create a new branch to store any new changes.
A
git branch my-branch
4
Q
Switch to that branch (line of development)
A
git checkout my-branch
5
Q
Make changes, for example, edit file1.md
and file2.md
using the text editor and
stage the changed files
A
git add file1.md file2.md
6
Q
Take a snapshot of the staging area (anything that’s been added)
A
git commit -m “my snapshot”
7
Q
Push changes to gitHub
A
git push –set-upstream origin my-branch