Code Monkey home page Code Monkey logo

geospatial-modeling-course's Introduction

NCSU GIS/MEA582: Geospatial Modeling and Analysis

Authors

Copyright 2008-2014 by

  • Helena Mitasova
  • Paul Paris
  • Anna Petrasova
  • Vaclav Petras

Course developed at North Carolina State University.

Basic Git introduction

Create a directory mea582_all or something like that and cd into it. Clone the repository:

git clone [email protected]:osgeorel/mea582.git

Eventually, you will have two directories at this directory level, one with the source code and another with the build of the pages.

Do all the changes in the mea582 directory created by the git clone command.

Once you edit some files, use git commit to commit them. Use -a flag to commit all or specify the filenames to commit just some of them. Use -m "some commit message" to describe the changes you made. The fastest way to commit might be, for example:

git commit -am "updated for GRASS GIS 7"

If you want to provide a longer commit message, just omit the -m "..." and you will get an editor (nano by default) where you can write a commit message.

If you created a new file, you have to tell Git to start tracking it:

git add some_file.txt

If you want to delete or move files, use git rm and git mv.

To see what files where changed, added or deleted use git status.

To review the changes in the files use git diff.

The commit itself records the change locally but does not put the change to the remote repository. Once you are ready to share your changes with others use git push to put the changes to the remote repository. All commits which were not pushed yet will by pushed.

To get the changes of other contributors use git pull. You always have to pull before you push. It is often necessary to commit your changes before git pull otherwise Git will not be able to merge the incoming changes. If you get an editor with a message about merging, it is enough just to use the generated message by exiting the editor (using Ctrl+X in case the editor is nano). If the automatic merge is not possible, Git will put the conflicting parts into the files and mark them. Consult the further steps with other contributors.

Build and publish

Web page is published NCSU course web space. The pages are build from the source code into a separate directory. The publishing step is done using a script.

Building the pages

In your clone of the repository where you are in master branch, use build-pages.sh script to build the pages.

./build-pages.sh

The directory where pages are build is on the same level as directory with the source code and is named mea582-gh-pages. You can look at the pages using e.g.

firefox ../mea582-gh-pages/index.html

If you don't see the changes you have made, delete the file in the build directory and build again (the mechanism to recognize changes is not smart).

Publishing the pages

One should not forget to commit and push changes to the repository when publishing so that changes are shared with other contributors. This is ensured using a script build-and-publish.sh. The script will require you to have all all changes committed and pushed and then it will publish them.

The script requires one parameter which is a destination for the rsync command. To work more effectively, you can create a script named my-build-and-publish.sh with hard-coded destination, for example:

#!/bin/bash

./build-and-publish.sh [email protected]:/courses/gis/

Don't forget to set it executable using chmod u+x. If you name the script my-build-and-publish.sh, it will be ignored by Git and you can publish the pages using:

./my-build-and-publish.sh

License

The text and images in this repository are under CC BY-SA 4.0 license.

Note that a lot of things are just linked material or data from different sources which can have different licenses.

The license does not apply to logos included in the web pages.

geospatial-modeling-course's People

Contributors

hmitaso avatar petrasovaa avatar wenzeslaus avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.