Git Bash Notes

git bash$ winpty docker run -it ubuntu /bin/bash Prefixing the path with a double slash (//bin//bash) or set MSYS_NO_PATHCONV=1


分叉拉取模式(fork and pull model)

GITHUB两种主要的pull request的开发模式 分叉拉取模式 任何开发人员可以在项目源仓库(upstream)分叉,然后仓库该分叉(origin)到本地文件系统进行开发 测试,测试完毕提交到分叉origin,并发送pull request到源仓库upstream, 源仓库维护人员评审 更改,并最终决定是否合并该更改到源仓库 在发送pull request之前,好几个开发人员共同为一个特性协作开发, 互相从对方的仓库拉取代码。 这时,从对方的仓库拉取代码简化重新定义一个remote,该remote把本地的分叉指向对方仓库地址。 单击Fork按钮(右上角) GITHUB把该仓库代码复制到自己的github账号,建立分叉仓库 打开git命令行客户端,把分叉仓库克隆到本地环境 git clone$USER_NAME/ cd git remote add upstream # Never push to upstream master git remote set-url --push upstream no_push # Confirm that your remotes make sense: git remote -v origin (fetch) origin (push) upstream [email protected]:wubigo/ (fetch) upstream [email protected]:wubigo/ (push) 同步本地代码到upstream git fetch upstream git checkout master git rebase upstream/master git push 查看各个分支的最新提交ID

Gitlab Notes

push to a mirror repository push to github at same time when a commit is pushed to gitlab Protected Branches By default, protected branches are designed to: prevent their creation, if not already created, from everybody except Maintainers prevent pushes from everybody except Maintainers prevent anyone from force pushing to the branch prevent anyone from deleting the branch Project members permissions NOTE: In GitLab 11.0, the Master role was renamed to Maintainer The following table depicts the various user permission levels in a project.