Useful Commands work with Github SCM

103 Likes Comment
Install git on Macbook via Homebrew:
brew install git

Verify the installation:

git --version

Connect to the github account. By using github username and personal access tokens

git config --global "your_github_username"
git config --global "[email protected]"

To create the personal access tokens as github password : From page, hit your github account avatar , then select Settings -> Developer Settings -> Personal Access Tokens -> Generate new token -> Configure the permission and copy the key.

Working with github from your local computer

echo "# mylabtest" >>
git init
git add
git commit -m "first commit"
git branch -M main
git remote add origin
git push -u origin main

push an existing repository from the command line

git remote add origin
git branch -M main
git push -u origin main

You might like


About the Author: Toc Xoan

Leave a Reply

Your email address will not be published. Required fields are marked *