Commit 8b201cef authored by 刘家荣's avatar 刘家荣 💬
Browse files

README.md & VCS.md

parent c97e0a77
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -61,3 +61,4 @@ $RECYCLE.BIN/
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/macos,windows
/out/
+11 −86
Original line number Diff line number Diff line
# BugChess



## Getting started

To make it easy for you to get started with GitLab, here's a list of recommended next steps.

Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!

## Add your files

- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:

```
cd existing_repo
git remote add origin https://mirrors.sustech.edu.cn/git/yeshu/bugchess.git
git branch -M main
git push -uf origin main
```

## Integrate with your tools

- [ ] [Set up project integrations](https://mirrors.sustech.edu.cn/git/yeshu/bugchess/-/settings/integrations)

## Collaborate with your team

- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)

## Test and Deploy

Use the built-in continuous integration in GitLab.

- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)

***
BugChess是在椰树集团精神下开创的一个鲜榨项目,是一次探索与定义下一代翻棋游戏的伟大尝试
***

# Editing this README

When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.

## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.

## Name
Choose a self-explaining name for your project.

## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.

## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.

## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.

## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.

## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.

## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.

## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.

## Contributing
State if you are open to contributions and what your requirements are for accepting them.

For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.

You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.

## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## 项目配置
### 要求:
- jdk17环境
- IDEA或者其他IDE(以下以IDEA为例)

## License
For open source projects, say how it is licensed.
1. File > Project Structure JDK版本选17, 语言特性JDK17
2. 右上角Edit Configurations, Build And Run下面第一行选JDK17, 主类选src里面的Main, 后面好像基本不用管了\
(如果已经有Configuration了就不用管)
3. 点击绿色播放键运行,跑起来就OK

## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
远程协作简介戳这里[VCS.md](docs/VCS.md)
 No newline at end of file

docs/VCS.md

0 → 100644
+75 −0
Original line number Diff line number Diff line
# 远程协作简介
远程协作,就是你写好的代码可以上传到VCS服务器上,然后我可以直接下载;

我们也可以在不同的“branch”上各自开发新功能,然后把branch给合并,这样我们的修改和新功能就可以合一起,也就是所谓并行开发

先打开左下角的git标签页 > Log标签页

## 基本概念
![./img.png](./img.png)

workspace,目前的工作环境,也就是你电脑上这个项目所在的真实文件夹

两个Repo, local和remote的repo,都是可以保存历史记录的代码仓库,里面有若干分支(branch),每个分支上按时间顺序从前往后有一串commit

commit是指一次更改,一次微小的,或者较大的更改,一次更改就是一个节点,一次次的更改累加在一起就是目前的最新状态,这样的好处一是增量更新,二是可以回溯重来

## 工作流程
原始的情况是这样:我们只要workspace和remote repo就OK了,这个时候一般一个团队里面会分多个小小组,每个小组负责一个功能,或者修bug

然后每个小组会负责一个branch, 内部的人就往远程repo上的对应branch上发commit,提交一次更改,然后这样累积

这个人提交了commit后,小组内其他人从远程仓库上面pull一下,就可以同步这个人的更改了

然后这个功能稳定后,就把这个分支merge合并到一个主分支上面去,这样这些更改就加到主分支上面了;然后原来的branch还在,但一般不要了就删了

然后开发其他功能的小组就把main分支给merge到小组自己的branch上,然后这些新功能和新更改就合并到自己的branch上面了

注意: 一般新分支的新建,是从已有分支上新建的分支,但这并不代表各个branch上有从属关系。各个branch本质上没有从属关系,\
只有说他们之间互相merge,rebase之类的操作。

## local repo 和 staging area

但是这里存在一个问题。有时候网络不好,不能及时查看远程repo的状态。有时候我们想看其他分支的文件,又不想丢失自己在原来的branch上没提交的更改;

Emmm, 于是乎我们有local repo和staging area

local repo也是储存那些分支和更改的,然后可以把remote的各个分支给fetch下来,同步到local repo下

也可以写好代码,commit到local repo上,然后把local repo上的这些commit节点给push到远程的分支上

这个时候我们一般把远程repo叫做origin, 远程的分支叫origin/xxxxx,local的分支叫xxxxx, 可以参看下面标签页的内容

![img_1.png](img_1.png)

另外我们有staging area,我们更改了一些文件,但说不准要不要这些更改,于是我们先战术add一下,add到staging area里面,当作暂时的草案

IDEA好像没有add。。。。。

然后一些比较不小的更改,拿不准要不要弄到remote上面,那我们就先commit到本地的仓库,然后先暂时不push上去

读到这里就可以自己发commit提交你的代码了

## 三个标签

众所周知每个branch是一串串的commit节点,那么有的时候别人往远程上新push了一次更改,那么我们还没来得及同步,

这个时候别人在branch那一条项链上的“位置”是领先我们一个commit节点的

???

我们需要一个表示“位置”的概念......

于是就有了三个标签

![img_2.png](img_2.png)

黄色的是workspace的位置,HEAD标签; 绿色的是local repo的位置标签,紫色的是远程的标签

当然一个repo会有各个分支的标签,这里只有一个分支,所以只有一个绿的和紫的标签

emmm这里要重新说明一下,本质上本地和远程的仓库是不必相同或者相似的,但是一般来说本地的和远程的仓库都是大致相同的,

他们的branch上面基本上都有相同的commit,可能会有少许不同,也只是可能local领先remote或者remote领先local之类的一些小不同

所以在IDEA的这个标签页里面,这个线路图自动把本地和远程的相同节点合并到一起了
 No newline at end of file

docs/img.png

0 → 100644
+51.8 KiB
Loading image diff...

docs/img_1.png

0 → 100644
+22.6 KiB
Loading image diff...
Loading