creating new repository 1

creating new repository

echo "# comp305_cw1" >>
git init
git add
git commit -m "first commit"
git branch -M main
git remote add origin
git push -u origin main

Here is what the above code is Doing:
1. Create a new directory called comp305_cw1
2. Change into that directory
3. Create a new file called
4. Add some text to the file
5. Initialise the directory as a git repository
6. Add the file to the repository
7. Commit the changes to the repository
8. Create a new branch called main
9. Add a remote repository called origin
10. Push the changes to the remote repository

Similar Posts