Connect to the Repository
Connect to the GitHub Repository.
Cloning a repository
Git’s advantage as a distributed source control system is its ability to clone a copy of the repository locally. Having a local copy of the repository gives you complete autonomy.
Use the git clone command to clone the repository you created. The clone command requires the <GitHub clone URL>.
Clone the repository by following these steps:
- Click Clone or Download, then click the copy or clipboard button.
- Use the
git clonecommand in the terminal, replace the<Github clone URL>with the repository’s URL.
- Change into the repository’s directory using the command below:
- List all the contents of the directory and show hidden files using the command below for the
bashshell:
You can use the following command for listing the contents in PowerShell:
Notice the .git directory. The .git folder makes it a Git repository. It was added when you created the repository using GitHub’s web interface.
Tracking changes
Git does not automatically commit your changes. You are responsible for staging and committing the changes. Git is aware of the changes, but you have to tell it which changes it should care about. ...