- 設(shè)置用戶名和郵件地址
https://help.github.com/articles/set-up-git/ - 設(shè)置SSH認(rèn)證
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ - 利用git bash 進(jìn)入到項(xiàng)目根目錄下
- 創(chuàng)建git
$git init
此時(shí)會(huì)在根目錄下自動(dòng)創(chuàng)建.git文件夾
- 創(chuàng)建.gitignore文件,表明哪些文件可以忽略
/.settings
/target
/.classpath
/.project
/.bpmn
- 連接Github遠(yuǎn)程倉庫(前提是在GitHub上已經(jīng)建立了這個(gè)倉庫)
git remote add origin git@github.com:username/reponame.git
- 將文件進(jìn)行快照處理用于版本控制
git add .
add <文件名>是追加指定文件, add .是追加當(dāng)前目錄下所有文件和子文件夾
- 提交到要地倉庫显押,并寫一些注釋
git commit -m "first commit"
- 將本地倉庫的東西提交到地址是origin的地址,master分支下
git push -u origin master
- 命令一覽
https://services.github.com/on-demand/downloads/zh_CN/github-git-cheat-sheet/ - github 官方幫助文檔
https://help.github.com/categories/managing-remotes/ -
其實(shí)在github上建完一個(gè)倉庫后會(huì)有命令提示
命令提示 - 關(guān)于設(shè)置標(biāo)簽(Tag)
參考此博中的第6條
http://blog.csdn.net/luckyyulin/article/details/21090905