My Git & GitHub journey
The journey is very nice,when you watch the video and pay attention to it.I gain a lot by practice the git on my computer.
This lesson walks through cloning, the local/remote relationship, the add → commit → push cycle, and pulling. 1. Cloning a Repository Cloning means downloading a copy of a GitHub repository to your local computer. Once cloned, you can create files, edit them, and send those changes back to GitHub whenever you're ready. To clone, you need the repository's URL (found on GitHub under the green Code button — make sure HTTPS is selected) and a Personal Access Token. Generating a Personal Access Token A Personal Access Token (PAT) is a security credential that allows Git to authenticate with your GitHub account. To generate one: 1. Click your profile picture on GitHub and go to Settings. 2. Scroll to the bottom of the left sidebar and click Developer Settings. 3. Click Personal Access Tokens, then Tokens (Classic). 4. Click Generate New Token (Classic). 5. Give the token a name, and set the expiration to No expiration (recommended while learning). 6. Under scopes, select the repo checkbox — this grants access to repositories. 7. Click Generate Token. 8. Copy the token immediately — you will NOT be able to see it again after leaving the page.
| 1 Treat Your Token Like a Password A Personal Access Token is a security credential. Do not share it, commit it into a file, or post it anywhere public — anyone holding it can act on your GitHub account exactly as you can. Running the Clone Navigate in your terminal to the directory where you want the repository to live, then run: git clone https://YOUR_TOKEN@github.com/yourusername/your-repo-name.git Replace YOUR_TOKEN with your Personal Access Token, yourusername with your GitHub username, and your-repo-name with the actual repository name. The general shape of that URL is: git clone https://[token]@github.com/[username]/[repo-name].git After pressing Enter, you'll see output
