-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,25 +10,40 @@ Once Git is installed, you need to configure it with your GitHub account informa | |
git config --global user.name "Your GitHub Username" | ||
git config --global user.email "[email protected]" | ||
``` | ||
|
||
Replace "Your GitHub Username" and "[email protected]" with your actual GitHub username and email. | ||
|
||
3. Generate Personal Access Token: | ||
- Click on your avatar > click on setting > on your left-hand side, click on Personal Access Token > Click on Tokens (classic) | ||
- Click generate new token and click on generate new token (classic) | ||
- Copy the generated the generated token. (Note: copy and store the token in your notes.) | ||
- Next when you clone a repo, system will prompt to key-in your username then user password. The password is the token which you have to key-in. | ||
|
||
4. Clone the respective repository | ||
```bash | ||
git clone <repository-url> | ||
cd <repository-directory> | ||
``` | ||
|
||
|
||
To check your configuration and see you set username and email | ||
```bash | ||
git config -l | ||
|
||
``` | ||
To store your token and you won't be asked next time | ||
```bash | ||
git config --global credential.helper cache | ||
``` | ||
To unset and forget your password | ||
```bash | ||
git config --global --unset credential.helper | ||
|
||
``` | ||
To unser the username and email | ||
```bash | ||
git config --global --unset-all user.name | ||
git config --global --unset-all user.email | ||
``` | ||
|
||
|
||
```bash | ||
git clone <repository-url> | ||
cd <repository-directory> | ||
``` | ||
|
||
```bash | ||
git checkout -b <branch-name> | ||
|