Goal: Learn how to work with remote repositories.
-
Create a Remote Repository:
- Create a new repository on GitHub or any other Git hosting service.
-
Add a Remote:
- Add the remote repository to your local repository:
git remote add origin <remote-repository-URL>
- Add the remote repository to your local repository:
-
Push to the Remote Repository:
- Push your local repository to the remote repository:
git push -u origin main
- Push your local repository to the remote repository:
-
Clone a Repository:
- Clone a remote repository to a new directory:
git clone <remote-repository-URL> new-directory
- Clone a remote repository to a new directory: