最基本的命令
# git add .
# git commit -m "描述"
# git push
git冲突解决步骤
# git stash 隐藏代码
# git pull 下拉代码
# git stash pop 展示隐藏的代码
如有冲突,解决冲突。
<<=======
远程的代码
========
自己的代码
=========>>
git基本操作
分支查看命令
# git branch -a 本地+远程
# git branch -r 远程
回退
# git reset --hard <commit-id> 版本回退---本地代码不保
# git reset --soft <commit-id> 取回远程代码---本地代码不受影响
# git reset --soft HEAD^ 取回commit内容---本地内容不收影响
远程覆盖本地
# git fetch --all
# git reset --hard origin/远程分支名
# git pull
原文:https://www.cnblogs.com/hui-code/p/12099083.html