Creating a local folder copy of remote GitHub repositories.
Cloning a Remote Repository
To duplicate an existing remote repository hosted on GitHub down to your local machine, use the git clone command along with the HTTPS or SSH link:
git clone https://github.com/username/my-project.gitThis command automatically does the following:
Creates a new folder matching the repository name.
Initializes a local Git database inside it.
Fetches all the history branches and commits.
Checks out the default branch (usually
mainormaster).Configures the remote source address as
origin.
Basic Terminal Operations
| Command | Purpose | Description |
|---|---|---|
| cd [dir] | Change Directory | Navigates into the specified folder. |
| ls | List Files | Lists all visible files in the directory. |
| ls -a | List All | Lists all files, including hidden files (like the .git folder). |