1. clone某个分支:
git clone ...
查看远端有哪有分支以及当前所在分支
切换到某个分支:
git checkout target_branch_name
本地代码也会跟着切换到这个分支
2.用本地的这个分支(hello)更新远端的hello分支:
git status
查看改了哪些地方
git add .
git commit -m "add hello"
git push origin hello:hello
3.合并两个分支
要把b2合并到b1,
先切换到b1:
git checkout b1
git merge b2
git status
git push origin b1
4.代码退回到某个commit
git log
查看历史记录,查看对应的commit_id
git reset --hard commit_id
git push -f
强制push