git 开发merge rebase 记录

时间:2023-12-14 08:16:20
    git status
git lg
git add src/
git commit -m "restful api and portal" //先commit到自己的本地branch
git lg
git fetch -p //origin的commit都会拉到本地
git lg
git rebase origin/develop //rebase到branch
git status
git lg
git status
git add src/
git commit -m "rebase origin develop" //解决冲突,然后再commit
git lg
git diff 107b458 HEAD
git diff HEAD~ HEAD
git lg
git branch
git push origin yhh
git branch
git lg
git branch aaa //随便建立一个分支
git lg
git checkout yhh //到自己的开发分支
git reset --hard aaa //然后强制替换
git lg
git push -f //push 到 origin的自己开发分支
git lg
git checkout develop //然后develop merge回来
git merge yhh
git push -f //更新 origin/develop分支
git lg

generate a patch and apply a patch, refer to https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/