Contribution Guidelines
en-cg
en-cg
  • Overview
  • Preface
    • How to Read This Document
  • Workflow with JIRA Issues
    • Introduction
    • Open: Register a JIRA issue
    • Confirmed: Issue Triage
    • Analysis, Develop: Progress of Work
    • Handover: Cleaning Up the Task
    • Resolved: Completing the Task
    • Test: Testing
    • Backport: Backporting
    • Closed: Terminating Issues
  • Workflow with Github
    • Introduction
    • Git Workflow
    • Git Branch Model
    • Feature Branch
    • Pull Request, Code Review, Code Merge
    • Backport
  • Workflow after Code Merging
    • Checking the QA Report
    • Procedure Guide in case of Test Failure (Regression)
    • Manual Creation Guide
  • Contributing Guideline for First Contributors
    • Contributor License Agreement (CLA)
    • Good first issue
    • Communication Channel
  • Release
    • Release
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Workflow with Github

Git Workflow

PreviousIntroductionNextGit Branch Model

Last updated 1 year ago

Was this helpful?

It's easy to understand that Git works only on branches, regardless of the repository. So, contributors do not have to do the sync between the main repository of CUBRID and their own forked repository.

Before proceeding with development, you only need to get a branch from upstream, start work. When you want to merge your work on the upstream (main) repository after some commits, you push the changes to your origin (forked) repository.

After pushing your changes on your origin (forked) repository, you can make a Pull Request.

You can refer to the following script:

git remote add upstream https://github.com/CUBRID/cubrid.git

git remote -v
#====
#    origin  http://github.com/hgryoo/cubrid (fetch)
#    origin  http://github.com/hgryoo/cubrid (push)
#    upstream        http://github.com/cubrid/cubrid (fetch)
#    upstream        http://github.com/cubrid/cubrid (push)

git fetch upstream

# Get a new branch to work on, create a branch from upstream!
# To prevent being reflected incorrectly by git push
# The two commands below must always be executed together.
git checkout -b CBRD-55555_my_work upstream/develop
git push -u origin CBRD-55555_my_work

# Add and commit your changes during your work
git add src/you/code
git commit -m 'code change'

# NOTE: Always write the remote name and branch name to prevent 
#       uploading to wrong remote
# Push your changes to your remote repository 
git push origin CBRD-55555_my_work

# When you want to get and sync with upstream's change
git fetch upstream
git merge upstream/develop