- Create an empty directory (you can name it my-repo)
 mkdir my-repo
- cd into it
 cd my-repo
- Initialize the directory
 git init
- Make a commit (an empty one is fine)
 git commit --allow-empty -m "first commit"
- Copy the path to the directory
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | environments: | |
| default: | |
| pipelines: | |
| - repo2-pipeline | |
| pipelines: | |
| repo2-pipeline: | |
| group: POC | |
| materials: | |
| foo-pipeline: | |
| pipeline: Build-Test | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --- | |
| format_version: 3 | |
| environments: | |
| internal: | |
| pipelines: | |
| - gocd-trial-launcher | |
| - gocd-trial-installers | |
| pipelines: | |
| gocd-trial-launcher: | |
| group: go-cd-contrib | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $(document).ready(function() { | |
| $('#roller button.add').on('click', function() { | |
| console.log("WAT") | |
| $('.dice').append('<div class="die">0</div>'); | |
| }); | |
| $('#roller button.roll').on('click', function() { | |
| $('.die').each(function(k, die) { | |
| var value = Math.floor((Math.random()*6)+1); | |
| $(die).text(value); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | A few things to note about AJAX and JQuery with Rails: | |
| 1- Rails ships with CoffeeScript (see coffeescript.org) | |
| 2- Jquery is officially bundled with the Rails (jquery-rails gem) | |
| 3- Rails uses Unobtrusive JavaScript (jquery_ujs library) | |
| Unobtrusive JavaScript? What's that? | |
| - ujs is a way to seperate your HTML, and CSS from your Javascript | |
| So how do we do that? Here is an example of obtrusive javascript: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!doctype html> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
| <link rel="stylesheet" href="main.css"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
| <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
| <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
| </head> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | https://github.com/kierarad/ar-student-schema | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Computer_Board | |
| attr_reader :board | |
| def initialize | |
| @ships = [%w[A A A A A], %w[B B B B], %w[C C C], %w[D D], %w[D D], %w[S S], %w[S S]] | |
| @board = Array.new(10) {Array.new(10,'/')} | |
| @mvmt = [ [-1, 0], #top | |
| [0, 1], #right | 
##Initializing a new repo Type in what comes AFTER the $...do not type in the $
BASIC git initialization and repo creation:
$ git init
This command creates an empty git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files. An initial HEAD file that references the HEAD of the master branch is also created.
NewerOlder