Start a new repository and publish it to GitHub Flashcards

1
Q

Create a new directory, and initialize it with git-specific functions

A

git init my-repo

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

change into the my-repo directory

A

cd my-repo

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

create the first file in the project

A

touch README.md

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

git isn’t aware of the file, stage it

A

git add README.md

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

take a snapshot of the staging area

A

git commit -m “add README to initial commit “

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

Provide the path for the repository you created on github
git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPOSITORY-NAME.git

Push changes to github

A

git push –set-upstream origin main

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