2015年2月7日 星期六

git 初次使用筆記

git初次使用筆記

git 本機端設定 

git config --global user.name “xxxx” 
git config --global user.email “xx@xx.com” 
xxxx為你的user name
xx@xx.com為你的email

git 基本指令

git clone https://github.com/gabrielecirulli/2048.git
  • 將github 上的code 下載下來 

在頁面右邊會看到這欄,複製HTTPS clone URL 下方的網址就可以




git branch

  • 列出目前所有的branch master : 本機端的master 

git branch new-branch
  • 產生新的branch,名稱為new-branch,若是沒有特別寫,會直接copy master 

git branch new-branch master
  •  由master新增branch出來 

git checkout new-branch
  • 換到new-branch這個branch上