Try   HackMD

Git 專案開發中-不同情境的操作

1_當自己階段性的完成工項時

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
將所做異動commit到本地數據庫做為紀錄點(養成好習慣)

// 將全部檔案加入暫存區
git add --all

// 查詢當前檔案狀態
git status

// 提交檔案到本地儲存庫
git commit -m "註解"

// 查詢commit紀錄
git log 

2_當自己階段性的完成"團隊所需的"工項時

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
將所做異動push到遠端Github

git push

// 查詢Github
git remote

3_當自己的工項完成時

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
pull request
(截圖)


4_當自己的工項過PR時

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
刪除本機的branch

// 切到本機指定的分支
git checkout <分支名稱>

// 刪除指定的分支
git branch -d <分支名稱>

// 查詢本機分支,以確認branch成功刪除
git branch 

5_當團隊成員的工項完成,並merge到master branch時

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
將團隊成員的異動,拉到本機數據庫

// 切換到master branch
git checkout master

// 拉最新版本到本地數據庫
git pull origin master

// 切換回到自己的branch繼續coding
git checkout <自己coding的branch>

Misc

1_資料夾相關操作
// 前往資料夾路徑(可拖曳資料夾)
cd C:\Users\使用者名稱\Desktop\project

// 取得目前所在的資料夾位置
cd
tags: frontend git Back to Front End Homepage
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →