start-here-guidelines
zero-to-masteryUpdated Feb 29, 2024
 

Use Linux CLI To Upload Files as a Branch

Tell git who you are, before you start

Start the github cli terminal:

wenyang@wenyang:~$ gh auth login ? What account do you want to log into? GitHub.com ? What is your preferred protocol for Git operations? HTTPS ? Authenticate Git with your GitHub credentials? Yes ? How would you like to authenticate GitHub CLI? Paste an authentication token Tip: you can generate a Personal Access Token here https://github.com/settings/tokens The minimum required scopes are 'repo', 'read:org', 'workflow'.

Link your terminal to the repo

Github will prompt you to input user name and password, however they have removed password authentacation. You need to input username and personal access token(classic).
Find token in Settings → Developer Setting → Personal Access Token → Tokens(Classic)
 

Upload files to Git-Hub repo

 
 
 

Remove Specific Commits

I uploaded a file consists of my personal information, and it’s still can be found in the commits if I just delete that file from github website, it’s not safe.
 

Alternative: Install Git-Hub and then upload files

Install github cli following below link: