Repository Basics
Main Goal: Making a repository to push and pull code in real time
What we did:
Initializing
We go into documents and clone git repository.
Making a new file = FileA.txt
print("Hello World")
git commit -m "Commiting FileA.txt, printing hello world"
git branch -M main = creates main branch
git push -u origin main = pushes FileA.txt into main branch
(Add the other collaborators)
git remote add origin link (when you add a origin you add a destination for the origin where you push the files into)
We need to request a pull to be able to pull from another person’s repository
Making all of our individual repositories and uploading them into the main branch
Side Notes:
cd .. = go backward
pwd = to see where you are
mk= make, dir = directory = mkdir
cd = call directory
cd(directory) = go into that directory
git clone link = makes a copy of previous repository and puts it on the local computer
yellow m = modified
git push = push pushes file into the main branch
git pull = takes the file from github
Troubleshooting:
-r = force
rmdir helloWorld = remove directory of “hello World”
Comments