此处完成的是 CMU15-445 Fall2022 的 bustub 项目。
创建 Private Repo
在 github “create a new repository” 页面中直接创建一个private仓库,如 bustub-private。
# 1. 在本地创建一个原仓库的 bare clone,取名 bustub-public
$ git clone --bare https://github.com/cmu-db/bustub.git bustub-public
# 2. 将原public仓库 mirror 到我们自己的private方库,这样就将public仓库的所有东西都推到private仓库
$ cd bustub-public
# If you pull / push over HTTPS
$ git push https://github.com/student/bustub-private.git master
# If you pull / push over SSH
$ git push [email protected]:student/bustub-private.git master
# 3. 删除本地对public仓库的clone
$ cd ..
$ rm -rf bustub-public
# 4. 将自己private仓库clone到本地机器
# If you pull / push over HTTPS
$ git clone https://github.com/student/bustub-private.git
# If you pull / push over SSH
$ git clone [email protected]:student/bustub-private.git
# 5. 添加public库作为第二个remote,便于及时获取公共库后续的更改
$ git remote add public https://github.com/cmu-db/bustub.git
# 可以查看现有的远程库信息,来确认已经添加好了remote
$ git remote -v
origin https://github.com/student/bustub-private.git (fetch)
origin https://github.com/student/bustub-private.git (push)
public https://github.com/cmu-db/bustub.git (fetch)
public https://github.com/cmu-db/bustub.git (push)
# 后续拉取公共库的最新更改:
$ git fetch public
$ git merge public/master
Build
Linux / Mac (Recommended)
为确保您的计算机上有正确的软件包,运行以下脚本自动安装它们:
# Linux
$ sudo build_support/packages.sh
# macOS
$ build_support/packages.sh
运行以下命令来 build 系统:
$ mkdir build
$ cd build
$ cmake ..
$ make
如果希望在调试模式下编译系统
标签:git,bustub,private,github,编译,提要,com,public From: https://www.cnblogs.com/angelia-wang/p/16916547.html