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
2
Q
change into the my-repo
directory
A
cd my-repo
3
Q
create the first file in the project
A
touch README.md
4
Q
git isn’t aware of the file, stage it
A
git add README.md
5
Q
take a snapshot of the staging area
A
git commit -m “add README to initial commit “
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