Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210360228
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210360228
Commits
0eb82bde
Commit
0eb82bde
authored
6 years ago
by
Sherman The Tank
Committed by
dutor
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added nGQL.md (#30)
parent
778e5fd5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CONTRIBUTING.md
+168
-0
168 additions, 0 deletions
CONTRIBUTING.md
README.md
+2
-2
2 additions, 2 deletions
README.md
with
170 additions
and
2 deletions
CONTRIBUTING.md
0 → 100644
+
168
−
0
View file @
0eb82bde
## Workflow
### Step 1: Fork in the cloud
1.
Visit https://github.com/vesoft-inc/vgraph
2.
Click
`Fork`
button (top right) to establish a cloud-based fork.
### Step 2: Clone fork to local storage
Define a local working directory:
```
sh
# Define your working directory
working_dir
=
$HOME
/Workspace
```
Set
`user`
to match your github profile name:
```
sh
user
={
your github profile name
}
```
Create your clone:
```
sh
mkdir
-p
$working_dir
cd
$working_dir
git clone https://github.com/
$user
/vgraph.git
# the following is recommended
# or: git clone git@github.com:$user/vgraph.git
cd
$working_dir
/vgraph
git remote add upstream https://github.com/vesoft-inc/vgraph.git
# or: git remote add upstream git@github.com:vesoft-inc/vgraph.git
# Never push to upstream master since you do not have write access.
git remote set-url
--push
upstream no_push
# Confirm that your remotes make sense:
# It should look like:
# origin git@github.com:$(user)/vgraph.git (fetch)
# origin git@github.com:$(user)/vgraph.git (push)
# upstream https://github.com/vesoft-inc/vgraph (fetch)
# upstream no_push (push)
git remote
-v
```
#### Define a pre-commit hook
Please link the vGraph pre-commit hook into your
`.git`
directory.
This hook checks your commits for formatting, building, doc generation, etc.
```
sh
cd
$working_dir
/vgraph/.git/hooks
ln
-s
../../hooks/pre-commit .
```
Sometime, pre-commit hook can not be executable. In such case, you have to make it executable manually.
```
sh
cd
$working_dir
/vgraph/.git/hooks
chmod
+x pre-commit
```
### Step 3: Branch
Get your local master up to date:
```
sh
cd
$working_dir
/vgraph
git fetch upstream
git checkout master
git rebase upstream/master
```
Branch from master:
```
sh
git checkout
-b
myfeature
```
**NOTE**
: Because your PR often consists of several commits, which might be squashed while being merged into upstream,
we strongly suggest you open a separate topic branch to make your changes on. After merged,
this topic branch could be just abandoned, thus you could synchronize your master branch with
upstream easily with a rebase like above. Otherwise, if you commit your changes directly into master,
maybe you must use a hard reset on the master branch, like:
```
sh
git fetch upstream
git checkout master
git reset
--hard
upstream/master
git push
--force
origin master
```
### Step 4: Develop
#### Edit the code
You can now edit the code on the
`myfeature`
branch. Please follow the coding style guidance
[
here
](
docs/cpp-coding-style.md
)
#### Run stand-alone mode
If you want to reproduce and investigate an issue, you may need
to run vGraph in stand-alone mode.
```
sh
# Build the binary.
make server
# Run in stand-alone mode.
vgraphd
```
Then you can connect the vGraph console to your local server
```
sh
vgraph
```
#### Run Test
```
sh
# Run unit test to make sure all test passed.
```
### Step 5: Keep your branch in sync
```
sh
# While on your myfeature branch.
git fetch upstream
git rebase upstream/master
```
### Step 6: Commit
Commit your changes.
```
sh
git commit
```
Likely you'll go back and edit/build/test some more than
`commit --amend`
in a few cycles.
### Step 7: Push
When ready to review (or just to establish an offsite backup or your work),
push your branch to your fork on
`github.com`
:
```
sh
git push
-f
origin myfeature
```
### Step 8: Create a pull request
1.
Visit your fork at https://github.com/$user/vgraph (replace
`$user`
obviously).
2.
Click the
`Compare & pull request`
button next to your
`myfeature`
branch.
### Step 9: Get a code review
Once your pull request has been opened, it will be assigned to at least one
reviewers. Those reviewers will do a thorough code review, looking for
correctness, bugs, opportunities for improvement, documentation and comments,
and style.
Commit changes made in response to review comments to the same branch on your
fork.
Very small PRs are easy to review. Very large PRs are very difficult to
review.
This diff is collapsed.
Click to expand it.
README.md
+
2
−
2
View file @
0eb82bde
##
VE
Graph
##
Nebula
Graph
A
scalable,
distributed graph database
A
high performance
distributed graph database
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment