---
# System prepended metadata

title: Github註冊與安裝重要指令

---

## Github 註冊及安裝
GitHub：
https://github.com/


Install Git:
https://github.com/git-guides/install-git


Check Git is installed:
    git version

設立Personal Access Token
    
Github Dashboard -> Settings -> Developer Settings -> Personal Access Tokens -> Generate New


Config Git username and email
    git config --global user.name "Your Name" 
    git config --global user.email "your@email.com"


Check git config:
    git config -l

Initiate a New Project
    git init
    git remote add origin https://github.com/mtacheco/test2.git 
    git add ./ 
    git commit -m ‘Your commit message’
    git branch -M main 
    git push origin main
    Git Pull
    Using a new Folder
    git init 
    git remote add origin PATH/TO/REPO.git 
    git fetch 
    git checkout -t origin/main


Pulling new updates
    it pull origin main


Remove remote origin
    git remote remove origin


