Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page assumes you have a GitHub account.

Forking and cloning the Edgent source code repository

  1. Go to the incubator-edgent GitHub repository
  2. Fork the repository by clicking on the Fork button at the top right. You’ll now have your own copy of that repository in your GitHub account (i.e., https://github.com/<YOUR_USERNAME>/incubator-edgent).

  3. Open a terminal/shell
  4. Create a local clone of your fork

    Code Block
    languagebash
    git clone git@github.com:<YOUR_USERNAME>/incubator-edgent
  5. Go into the project directory

    Code Block
    languagebash
    themeConfluence
    cd incubator-edgent
  6. Add the remote repository 

    Code Block
    languagebash
    git remote add upstream https://github.com/apache/incubator-edgent.git
  7. Verify the new upstream repository you've specified for your fork

    Code Block
    languagebash
    $ git remote -v
    origin  git@github.com:<YOUR_USERNAME>/incubator-edgent.git (fetch)
    origin  git@github.com:<YOUR_USERNAME></incubator-edgent.git (push)
    upstream    https://github.com/apache/incubator-edgent.git (fetch)
    upstream    https://github.com/apache/incubator-edgent.git (push)

Pulling

The following commands assume that your remote repository is named upstream.

...

in remote changes

Update your master branch with remote master changes.

Code Block
languagebash
git co master
git fetch upstream
git merge upstream/master
git push

Update PR with master's changes

Updating a pull request with the latest changes in the master branch

Before a pull request can be merged in, it must contain the latest changesUpdate a pull request that doesn't have the lastest changes in master.

Code Block
languagebash
git fetch upstream master
git checkout master
git rebase upstream/master    # the clone's master is now up to date
git push                      # the fork's master is now up to dategit checkout QUARKS-XXXdate
git checkout QUARKSEDGENT-XXX       # QUARKSEDGENT-XXX is the name of your branch; replace with your branch's name
git rebase master
                              # ... resolve any conflicts as noted by "git status"
                              # the clone's QUARKSEDGENT-XXX is now up to date
git push -f                   # the fork's QUARKSEDGENT-XXX is now up to date
                              # if no other conflicting changes have happened on master, the PR should now report no conflicts

...

Setting up Git aliases

Set up your name and email address.

Code Block
languagebash
git config user.name "<FIRSTNAME LASTNAME>"
git config user.email "<EMAIL>"

 

These are helpful for quick access to commonly used Git commands.

...