发出请求

GeoNetwork使用拉取请求工作流,允许管理和审查更改。所有的工作都在分支上完成并合并回来。在开发时,从要更改的分支开始,从那里创建一个新的功能分支,在功能分支上进行更改,将功能分支发布到GitHub回购,发出请求,要求审阅和合并更改。

偶尔核心地理网络开发者会在上游建立一个功能分支来探索特定的主题。当作为请求提交时,这些共享特性分支将受到审查 master .

有很多很好的指南(见上面的链接),但这里有一个快速的序列说明如何进行更改和提交更改。

$ git checkout master
   # master is the 'trunk' and main development branch
   # the checkout command "checks out" the requested branch

$ git checkout -b myfeature
   # the -b requests that the branch be created
   # ``git branch`` will list all the branches you have checked out locally at some point
   # ``git branch -a`` will list all branches in repository (checked out or not)

# work work work

$ git status
   # See what files have been modified or added

$ git add <new or modified files>
   # Add all files to be committed ``git add -u`` will add all modified (but not untracked)

$ git commit -m "<a short message describing change>"
   # Commit often.  it is VERY fast to commit
   # NOTE: doing a commit is a local operation.  It does not push the change to Github

# more work
# another commit

$ git push origin myfeature

   # this pushed your new branch to Github
   # now you are ready to make a Pull Request to get the new feature added to GeoNetwork

# revise pull request based on review feedback
# another commit
# another push to update pull request
# Success!!

GeoNetwork使用git子模块来跟踪外部依赖项。必须在分支更改后初始化和更新它们:

git submodule update --init