This page assumes you have a GitHub account.
Forking and cloning the Edgent source code repository
- Go to the incubator-edgent GitHub repository
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).
- Open a terminal/shell
Create a local clone of your fork
Code Block language bash git clone git@github.com:<YOUR_USERNAME>/incubator-edgent
Go into the project directory
Code Block language bash theme Confluence cd incubator-edgent
Add the remote repository
Code Block language bash git remote add upstream https://github.com/apache/incubator-edgent.git
Verify the new upstream repository you've specified for your fork
Code Block language bash $ 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 | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
git config user.name "<FIRSTNAME LASTNAME>" git config user.email "<EMAIL>" |
These are helpful for quick access to commonly used Git commands.
...