Github & Markdown

How to setup a Github repository and push content

Github

Github interface:

  • Connect to your Github account an chose “Create new repository” on the top right panel.
  • Give it a name & description and save.

Back to your desktop, install Git and enter your Id and mail.

$ apt-get install git
$ git config --global user.name "your account name"
$ git config --global user.email "account email"

Create a folder for your work, code, pages, whatever. Open a terminal and initialize your folder with:

$ git init
$ vim README.md

This will create the project’s markdown readme file. Markdown is a rich and easy formatting syntax. This readme will be displayed on your Github repo page to explain your project.

Connect the local folder to your Github repo :

$ git remote add origin https://github.com/username/gitFolderName.git

Configuration is over. Learn the 3 basic Git rules to send data:

  1. List the files to be sent on your repo
  2. Commit your files with the appropriate message
  3. Send files
 $ git add filename # specify a single file
 $ git add -u       # select all, including deletions
 $ git commit -m 'message'
 $ git push origin master

Pull content from repositories

Create your local folder, initialize it:

$ mkdir SomeoneProject
$ cd SomeoneProject/
$ git init

Pull the project’s files in your local folder:

$ git pull https://github.com/username/repo

Play with it.

Markdown

A quick historic reminder first ?

The Markdown language was created in 2004 by John Gruber with substantial contributions from Aaron Swartz,with the goal of allowing people “to write using an easy-to-read, easy-to-write plain text format, and optionally convert it to structurally valid XHTML (or HTML)”.

All you want to know will be on John Gruber’s webpage : philosophy, basics and syntax.

  • On Linux, Vim will automatically detect & colorize .md extension files
  •  Gedit has an excellent markdown plugin, with HTML live preview.

gedit-md

Links

Advertisements

Comments are closed.

Create a free website or blog at WordPress.com.

Up ↑