Codewind Git Repo Setup
Setup Development Environment for Codewind
Complete the following steps to setup your Codewind Git repository.
- Step 1 : [Step 1 : Create a fork of repo
- Step 2 : [Step 2 : Setting up the inbound/outbound "triangle"]
- Step 3 : [Build Codewind from your repository]
Step 1 : Create a fork of repo
In this document, the eclipse/codewind repo is used as an example but the setup process is the same for other Codewind repos (you just need to replace the codewind repo name with the one that you are working on). The complete list of Codewind repos can be found in Codewind Project-Developer Resources.
Navigate to the corresponding repo page, e.g. https://github.com/eclipse/codewind) and click the **Fork button** in the top upper right corner and select your account as the location to hold the fork. Already have a fork, you say? Well, click the **Fork button** anyway, and you will see your existing fork. You need a fork called named <github-user>/codewind.
Step 2 : Setting up the inbound/outbound "triangle"
NOTE: The following highlighted commands are utilized from a Git-Bash command window. Also ensure that you've started your SSH agent.
[Github Triangular Workflow https://github.com/eclipse/Codewind/blob/master/images/CodewindTriangularWorkflow.png]
First, create a directory on your local system to hold the source code.
mkdir codewind cd codewind
Windows users: Set this config flag to allow file paths to go beyond 260 chars.
git config --global core.longpaths true
Clone the main repository onto your local system via this command.
git clone email@example.com:eclipse/codewind.git
Next, setup the second side of the triangle via this command (ensure you change **<github-user>** to your public GitHub (github.com) user name:
cd codewind git remote add my_fork firstname.lastname@example.org:<github-user>/codewind.git
NOTE: Ensure you use your github.com id
Next, configure the local repository to push your commits to the fork repository you created above:
git config remote.pushdefault my_fork
This will now pull from origin, the main repository, and push to the fork, your fork repository.
This option requires at least Git 1.8.4. It is also recommended that you configure
git config push.default simple
unless you are already using Git 2.0 where it is the default. Don't know what version you have?
Finally, the third side of the triangle is pull requests from your fork repo to the main repo.
You can run the following command to verify your triangle was created successfully:
git remote -v
You should see output similar to the following:
> $ git remote -v > my_fork email@example.com:<github-user>/codewind.git (fetch) > my_fork firstname.lastname@example.org:<github-user>/codewind.git (push) > origin email@example.com:<github-user>/codewind.git (fetch) > origin firstname.lastname@example.org:<github-user>/codewind.git (push)
You will need to setup your 'master' branch since integration is the default:
> $ git checkout -b master origin/master > $ git pull > $ git push