注意:尽量不要直接git pull
,因为git pull
会隐藏一些中间细节,它会直接将远程主机的最新内容合并到当前分支,建议使用:git fetch
和git merge
git fetch origin master
git checkout my_branch
git merge master
git merge FETCH_HEAD
git branch
git branch -r
git branch new_branch_name
git branch -d delta_branch_name
git branch -d -r delta_branch_name
git push origin delta_branch_name
git branch -m old_branch_name new_branch_name
git diff master my_branch
git diff branch1 branch2 --stat
git diff branch1 branch2 file_path
git log branch1 ^branch2
git log branch1..branch2
git log branch1...branch2