Menggen / stocktotal -- Bitbucket
原本使用 GitHub,但同事 Ben 哥大力推薦,Bitbucket 果然是好物,可以建立 private repo,這年頭最好賣的就是隱私跟風格,GitHub 拿來賣,Bitbucket 千萬別淪陷了。
遠端使用 BitBucket
$ git remote add origin https://Menggen@bitbucket.org/Menggen/stocktotal.git
事前已經準備 .gitignore,但忘記把 source/core/thirdparty 排除在外,裡面有一些版權複雜的東西,不要亂傳上去。接著執行
$ git init $ git add . $ git rm --cached -r source/core/thirdparty畢竟還是被我看出來了,趕緊編輯 .gitignore,把 source/core/thirdparty 加進去。然後注意一點,.gitignore add 後又改變,產生衝突,究竟是用新的還是用舊的,自己決定。如果用新的,請執行
$ git add .gitignore接著 commit 到 local master,再把他 push 到遠端
$ git commit -m'Initial commit' $ git push -u origin master
壓標籤 (tag)
$ git tag -a v1.0.0 -m'Initial version' $ git push origin v1.0.0
修改檔案
- 打開文字編輯器修改檔案 (README.md)
- git add README.md
- git commit -m 'Adjust README.md format'
- git push -u origin master
Git 真是他媽的好屌的工具呀。不過以上只是使用過程,也就是很表面的東西,真正要看進去,恐怕我還要花很多時間來了解他。
沒有留言:
張貼留言