:::info # Git-it step ::: ###### tags: `Git-it` --- ## (P)Get Git ### 安裝 Git Git-it [<安裝歩驟連結>](https://link.medium.com/ItR7ONc5c5) ### 建立測試目錄  ### 設定 Git  ### Check config information  --- ## (P)Repository ### 建立一個 Repository  --- ## (P)Commit To It ### 建立新文件 - 使用 vi [vi 指令說明](https://poychang.github.io/note-vi-vim/) [超簡明 Vim 操作介紹](https://gitbook.tw/chapters/command-line/vim-introduction.html) #### vi 建立檔案  #### vi 開啓後進入 **命令模式**(下面沒有 --插入- -)  #### 按 a,i,o 任一鍵進入 **插入模式**(下面有 --插入- -)  #### 進入 **插入模式**後,便能開始打字  #### 編輯完畢,按下 ESC 鍵,可退回**命令模式**(下面沒有 -- 插入- -);準備存檔  #### 按下 :wq↵ 存檔完成後離開; :q!↵ 不存檔直接離開  #### 使用 cat查看檔案的內容  #### 檢查狀態、Add 及 Commit 修改  ### 繼續修改檔案 ``` vi readme.txt and press o to enter 插入模式 ```  ``` press Esc and :wq↵ to exit vi and save file ```  ### commit readme.txt ``` git status to check the current status git add 檔案/. to add the changed file git commit -m "你的訊息" to commit this change ```  #### git log 檢視 Commit 的紀錄  --- ## (P)GitHubbin ### 建立一個GitHub帳號 [前往github.com註冊一個免費的帳號](http://github.com) ### 告訴Git你的GitHub帳號  --- ## (P)Remote Control :::success - 部分圖片過大,建議點擊標題連結開啟新分頁查看。 ::: ### [建立一個Remote Repository](https://i.imgur.com/qcQp32x.gif)  ### 連結本地(Local)和遠端(Remote) #### [GitHub repository網址](https://i.imgur.com/iopDlpS.png)  #### 設定 origin  ### 把你的修改Push到遠端 #### [$git push origin master](https://i.imgur.com/xvmXzY8.gif)  #### [確認readme.txt](https://i.imgur.com/ihaO8Xt.png)  ## (P)Fork And Clones ### [Fork](https://i.imgur.com/i3jnQIX.gif)  ### 將fork的專案clone到本地  ### 連結原始Repository  ### 新增一個branch  ### 新增一個檔案  ### [GitHub web page before git push](https://i.imgur.com/lPbam4v.png)  ### 紀錄修改  ### Push剛才記錄好的修改到GitHub上  ### After push complete, a pull request can be made #### [add-wschentw.txt had pushed to GitHub](https://i.imgur.com/lNvSM3N.png)  ### 新增一個協作者到你的專案  ### Reporobot都做了些什麼呢  --- ## (P)[建立 Pull Requests](https://i.imgur.com/W19fp6S.png)  ### [自動merge](https://i.imgur.com/Su74seh.png)   ## (P)Final 
×
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