You will need to be an Apache Edgent committer to follow these steps. If you are not a committer, please open a pull request with your changes, and a committer will commit your changes.

The process differs slightly for merging source code vs. website pull requests.

Source code

  1. Create a clone to be used specifically for merging PRs (this only needs to be setup one time)

    git clone https://git-wip-us.apache.org/repos/asf/incubator-edgent.git clone-incubator-edgent
    cd clone-incubator-edgent
    git remote add mirror https://github.com/apache/incubator-edgent.git
  2. Run the following commands to merge an open PR. Replace XX with the PR number shown in GitHub.

    cd clone-incubator-edgent
    git checkout master						# Switch to master
    git pull origin master				 	# Update master
    git fetch mirror pull/XX/head:pr-XX 	# Fetch the changes from the pull request. This creates a new local branch pr-XX.
    git merge pr-XX 						# Update master with the PR's changes
    git push origin master 					# Push updated master to Apache Git repo
    git branch -d pr-XX 					# pr-XX is only a temp branch, no need to push to origin (ASF)

Website

  1. Create a clone to be used specifically for merging PRs (this only needs to be setup one time)

    git clone https://git-wip-us.apache.org/repos/asf/incubator-edgent-website.git clone-incubator-edgent-website
    cd clone-incubator-edgent-website
    git remote add mirror https://github.com/apache/incubator-edgent-website.git
  2. Run the following commands to merge an open PR. Replace XX with the PR number shown in GitHub.

    cd clone-incubator-edgent-website
    git checkout master                           # Switch to master
    git pull origin master                        # Update master
    git checkout asf-site                         # Switch to asf-site
    git pull origin asf-site                      # Update asf-site
    git checkout master                           # Switch to master
    git fetch mirror pull/XX/head:pr-XX           # Fetch the changes from the pull request. This creates a new local branch pr-XX.
    git merge pr-XX                               # Update master with the PR's changes
    git push origin master                        # Push updated master to the Apache Git repo
    sh build.sh                                   # Generate the HTML files, switch to asf-site, and update it (make sure you're on master when running)
    git push origin asf-site                      # Push updated asf-site to the Apache Git repo
    git checkout master							  # Switch to master
    git branch -d pr-XX                           # pr-XX is only a temp branch, no need to push to origin (ASF)

 

Note: The first time you commit, you may need to manually create a local copy of the asf-site branch.

git checkout origin/asf-site 	# Switch to asf-site
git checkout -b asf-site       	# Create an asf-site branch


  • No labels