Thanks to visit codestin.com
Credit goes to github.com

Skip to content

git_setup

Zhu Ming edited this page Oct 12, 2014 · 4 revisions

Git Setup

Content

  1. Git repositories & remotes
  2. Git branches
  3. Local Git Setup

Git repositories & remotes

There are a few git repositories involved in the process.

Upstream

The official CakePHP docs repository can be found at https://www.github.com/cakephp/docs.git. This is the source of all the original text (that is, the English version of the manual).

Since the original text is also updated from time to time, it is important to keep it synchronized as a basis for the translation work. We will call this the upstream repository. This is also the name of the remote to be added in your local git setup.

This repository is readonly to you. You cannot push any changes to it. Your translation work and and any changes on the original text must be submitted as a pull request and wait for the maintainers of the docs project to approve and merge. The later part of this guideline will describe how to create a pull request. After that, the changes will eventually appear in the official CakePHP cookbook.

Origin

You need to have a repository as your workspace. This is the place to hold the work you want the project maintainers to merge.

There are two options. You can fork from the official docs repository under your Github account. Or you can use my fork [email protected]:blackpuppy/docs.git directly.

Please clone the project to your local from my fork at [email protected]:blackpuppy/docs.git or your own fork at [email protected]:<your_github_account>/docs.git. When prompted, you should retrive all branches from the remote. Now you get your origin remote.

Next, please add https://www.github.com/cakephp/docs.git as the remote upstram.

Oschina

This is a legacy repository. The Simplified Chinese translation of CakePHP cookbook was initiated by mafeifan at [email protected]:finley/CakePHP_zh.git. Please add this repository as the remote oschina. This repository is still kept as a backup. There is no active work on it. We only push changes to it.

Git branches

If you have cloned my repository, you should notice you have a few branches. Otherwise, you should create those missing branches.

  1. master This branch is basis for any further work. You should keep this branch up-to-date with the official CakePHP docs master branch, that is, upstream/master.
  2. zh This branch contains the final work to be submitted to CakePHP. We will create pull request from here. Any commits should pass the checklist.
  3. zh_work This branch is our main working branch. All upstream changes is also pulled or merged into this branch. And we need to check the changes in /en/ folder and ensure the translation is synchronized with the original text. You will also see a lot of translation work previously done in oschina repository that is not merged into official CakePHP docs repository. Now it's all merge into this branch as a starting point for our translation work.
  4. oschina This branch is for synchronization with remote oschina. Any changes in the branch zh_work is merged into this branch, and then pushed to the remote oschina. As mentioned earlier, the oschina repository is basically readonly, so is the oschina branch.

Local Git Setup

TODO: ssh keys, etc.

Clone this wiki locally