在來到D槽開個資料夾:
git-local-repo
在此目錄下開cmd
打上指令:
git init(會建立初期的git repository)
在資料夾會看到隱藏檔
回到Eclipse的Java專案spring-cloud-config-server
右鍵連動該專案與剛剛建的git repository
Build Path → Configuration Build Path…
就會看到多了對應的資料夾在project內
在這個新目錄右鍵新增file
準備將要給予的設定檔資料放這裡面
所以命名為limits-service.properties (limits-service即專案名)
並把原本limits-service專案內設的設定值抄過來(也調整一下數值)
上面只是在Eclipse的專案目錄的設置,對於git來說這筆新的檔案還沒commit
所以一樣在同個cmd下執行指令:
git add 檔名
或是
git add -A
(上面意指全部登記)
接著下指令:
git commit -m “first commit”