--- title: 'Git quick-start' disqus: hackmd --- ###### tags: `Git` Google Ad Api quick-start === [TOC] ## 筆記目的 有個本地端檔案,將它提交到github上備份 本筆記可參考[](https://zlargon.gitbooks.io/git-tutorial/content/remote/upstream.html) ## 先備條件 1. 下載了 git 2. 擁有github帳號 ## 概念 git 有所謂的版本控制和備份的工具,既然是備份,當然會分成兩種備份的空間,一個是本地端的,另外一個則是遠端的(把它想成雲端就好) 首先看一下所謂的示意圖  > 資料源自於udemy上的2021網頁開發全攻略課程 ## 在github上新增一個repo  ## 本地端動作 打開git bash 利用cd 指令移動到你所屬的資料夾 假設你在桌面有個資料夾叫做project的話 ``` cd desktop cd project/ ``` ``` git init git add . git commit -m "initail commit" ``` > 上面的指令目的是為了要讓專案資料夾被git 初始化 ``` git remote add origin XXXXXXXXX git push -u origin master ``` > XXXXXXXXX 請換成github上專案的網址 ## 情境題 你將一個本地a資料上傳到了GITHUB上, ## Eclipse Git 操作 checkout 專案右鍵 => Team =>Show in Repository View => Branch => Remote Tracking => check out what you want => Local => check out what you want 
×
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