How to Contribute to the Web Pages

Estimated reading time: 1 minute

Web Site Repository

The content of this web site can be found on GitLab of CEPC. Any changes to this repository will be automatically reflect to the pages on http://cepcsoft.ihep.ac.cn.

The write access of http://cepcgit.ihep.ac.cn/web/cepcsoft.ihep.ac.cn will not be open to everyone. CEPC users could follow the instructions on this page to contribute to the web site.

Preparation

Need account on GitLab

Fork the cepcsoft.ihep.ac.cn repository to your own account.

Fork

git clone git@cepcgit.ihep.ac.cn:<your_github_user_name>/cepcsoft.ihep.ac.cn.git
git remote add cepcsoft http://cepcgit.ihep.ac.cn/web/cepcsoft.ihep.ac.cn.git

All these preparations are only needed for the first time. Everything is now ready for writing or modifying the web pages.

##

  1. Guarantee the local version is the latest.
    git fetch cepcsoft
    git merge cepcsoft/master
    
  2. Edit files and commit changes.
    git add -A
    git commit
    
  3. Merge local changes with remote. Resolve conflicts.
    git fetch cepcsoft
    git merge cepcsoft/master
    
  4. Push to your own repository.
    git push origin master
    
  5. Create merge request under the forked repository on GitLab.

Merge Request

If you did not create new branch, it should be master here.

Preview

script/preview.sh

Git Reference

http://git.github.io/git-reference/

Pro Git book

Edit Directly on GitLab

In case you do not have linux environment at hand. This could be done even on the cell phone.

It is no recommended for normal update of the web page, because the conflicts are diffcult to resolve on web.