# VScode Git使用方法(Mac) ## :question: Purpose This tutorial is for uploading the file into GitHub. ## :feet: Step 1. Go to terminals 1. `brew install git` 2. `git config --global user.email "<電郵地址>"` 3. `git config --global user.name "<暱稱>"` 2. 把要push的檔案存擋 3. 按左邊第三個鍵然後按Publish to GitHub 4. 輸入commit message 5. 按commit 6. 成功Push ### 新增忽略的檔案類型 1. 新增.gitignore檔 * 資料夾 : /folder name * 檔案類型 : *.檔案類型 ex. *.txt #### 若在.gitignore創建前已經上傳了需忽略的內容 ``` git rm -r --cached . //清除所有之前git的快取(沒有刪除檔案) git add . //套入.gitignore規則,重新上傳 上傳 ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up