Skip to content

Latest commit

 

History

History
149 lines (119 loc) · 3.22 KB

setup-git-repository-for-project.adoc

File metadata and controls

149 lines (119 loc) · 3.22 KB

Use git to take a snapshot of initial state

Previous: Install Rake and Bundler

Tutorial 4

This tutorial…​

Initialize new git repository

$ git init .
Console output
Initialized empty Git repository in ...

Instruct git to ignore generated files

$ cat > .gitignore << LINES
/.awestruct/
/.ruby-*
/.sass-cache/
/_site/
/_tmp/
/Gemfile.lock
LINES
Note
On Windows, run notepad .gitignore, remove all text and paste the content between LINES from above.

Disable Jekyll

Linux / OSX
$ touch .nojekyll
Windows
$ echo "" > .nojekyll

Add all non-ignored files to the git repository

$ git add .

Commit the changes to make the snapshot

$ git commit -m "Initial import of website sources"
Console output
 30 files changed, 18757 insertions(+)
 create mode 100644 .awestruct_ignore
 create mode 100644 .gitignore
 create mode 100644 .nojekyll
 create mode 100644 Gemfile
 create mode 100644 Rakefile
 create mode 100644 _config/site.yml
 create mode 100644 _ext/pipeline.rb
 create mode 100644 _layouts/base.html.haml
 create mode 100644 humans.txt
 create mode 100644 index.html.haml
 create mode 100644 javascripts/foundation/foundation.alerts.js
 create mode 100644 javascripts/foundation/...
 create mode 100644 javascripts/vendor/custom.modernizr.js
 create mode 100644 javascripts/vendor/jquery.js
 create mode 100644 javascripts/vendor/zepto.js
 create mode 100644 robots.txt
 create mode 100644 stylesheets/_normalize.scss
 create mode 100644 stylesheets/_settings.scss
 create mode 100644 stylesheets/app.scss
Tip
Changes are now tracked by git. You can rollback at any time.

Create repository on GitHub

Owner

%USERNAME%

Repository name

writeadapt-%USERNAME%

Description (optional)

An Awestruct demo site

Options

Don’t check "Initialize this repository with a README"

Connect git repository to GitHub remote

$ git remote add origin https://github.com/%USERNAME%/writeadapt-%USERNAME%
$ git push origin master
Important
Replace %USERNAME% with your GitHub username.

Next: Configure website name, title, author and organization