Git指令彙整
在本機下載專案 git clone user@website:my/path/projectname.git git clone git@github.com:zlargon/git-test.git 在本機下載專案 git clone -b fix-header git@github.com:zlargon/git-test.git 在本機下載專案 git clone -b fix-header --single-branch git@github.com:zlargon/git-test.git 在本機下載專案 git clone -b fix-header --single-branch git@github.com:zlargon/git-test.git 分支 列出本地(local)分支 git branch 列出遠程(remote)分支 git branch -r git branch --remotes 列出本地、遠程全部分支 git branch -a git branch --all 新增分支 git branch branch_name 新增develop git branch develop 將分支develop合併於master git checkout master git merge develop --no-ff 顯示小耳朵 git log --oneline --graph 刪除本地(local)分支 git branch -d branch-name 刪除遠程(remote)分支 git push origin -d branch-name git reset --hard git clean -f git clean -df git rebase HEAD~1 --exec "git commit --amend --no-edit --date 'now'" git rebase HEAD~2 --exec "git commit --amend --no-edit ...