- Go to your GitHub profile and click on Settings.
- In the left sidebar, click on Developer settings.
- Click on Personal access tokens.
- Click on Generate new token.
- Give the token a descriptive name.
- Select the scopes you need for the token (e.g., repo, read:user, user:email).
- Click on Generate token.
- Copy the token to your clipboard.
- Open notepad on the Windows Host, create a new file and paste your token into the file for easy access.
- Clone the repository to your local machine using the
git clone
command. - Make changes to the files in the repository as needed.
- Open a terminal and navigate to the local repository.
- Configure Git to use your GitHub username and email address by running the following commands, replacing the placeholders with your own information:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
- Add the changes to the local repository using the
git add
command. For example, if you want to add all changes, rungit add .
. - Commit the changes using the
git commit
command. For example, if you want to commit with a message "Updated files", rungit commit -m "Updated files"
. - Push the changes to the remote repository using the
git push
command and the personal access token you created earlier. For example, if you want to push changes to themain
branch, rungit push https://<personal-access-token>@github.com/<username>/<repository-name>.git main
.
Note: Replace <personal-access-token>
, <username>
, and <repository-name>
with your own information.
That's it! Your changes should now be pushed to the remote repository using your GitHub Personal Access Token.