Skip to content

Commit

Permalink
edit readme, change verifies to exec
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Jan 22, 2014
1 parent 72cd0e4 commit 0bfa328
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A [workshopper](https://github.com/rvagg/workshopper) module for learning Git an

## Hello, future Forkers, Branchers and Pull Requesters!

This app runs in your Terminal (Mac) or Bash (Windows) and has challenges for learning Git and GitHub. It uses the _real_ terminal (so you'll be learning the awesome command line), it uses _real_ Git and GitHub (instead of emulating the command line Git environment as some online apps do) which means when you finish all of the challenges you'll have _real_ repositories on your GitHub account and green squares on your [contribution chart](https://github.com/blog/1360-introducing-contributions).
This app runs in your Terminal (Mac) or Bash (Windows) and has challenges for learning Git and GitHub. It uses the _real_ terminal (so you'll be learning the awesome command line), it uses _real_ Git and GitHub which means when you finish all of the challenges you'll have _real_ repositories on your GitHub account and green squares on your [contribution chart](https://github.com/blog/1360-introducing-contributions).

![contributions](https://raw2.github.com/jlord/git-it/master/ghcc.png)

Expand Down Expand Up @@ -48,9 +48,9 @@ $ git-it

#### Tips

**Code snippets** Oftentimes you'll see things like `$ some code-stuff --here`. The dollar sign identifies the line as one a user would enter into the the command line, but you don't actually include it when you type it into terminal. In this case, you'd actually just type `some code-stuff --here`.
**Code snippets** often times look like `$ some code-stuff --here`. The dollar sign identifies the line as one a user would enter into the the command line, but you don't actually include it when you type it into terminal. In this case, you'd actually just type `some code-stuff --here`.

**Command line, terminal, bash** All basically mean the same thing, the MS-DOS, Doogie Howser looking screen that you just type commands into. You can do a lot of things from your terminal like delete, rename, copy or create files and folders; run scripts and send things back and forth between servers (like the ones storing things on GitHub.com) and your computer (also a server!).
**Command line, terminal, bash** all basically mean the same thing: the MS-DOS, Doogie Howser looking screen full of words and numbers. It's awesomely powerful. You can do a lot of things from your terminal like delete, rename, copy or create files and folders; run scripts and send things back and forth between servers (like the ones storing things on GitHub.com) and your computer (also a server!).


#### Topics Covered in Git-it
Expand All @@ -65,8 +65,4 @@ $ git-it
- Creating **branches** for features/changes
- Adding and working with a **collaborator** (Hi, @reporobot!)
- Creating a **pull request**
- **Merging** and **deleting** branches




- **Merging** and **deleting** branches
Binary file modified ghcc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 6 additions & 10 deletions problems/commit_to_it/verify.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#!/usr/bin/env node

var spawn = require('child_process').spawn
var concat = require('concat-stream')

var show = spawn('git', ['show'])

show.stdout.pipe(concat(onShow))
var exec = require('child_process').exec

// check that they've commited changes

function onShow(output) {
var show = output.toString().trim()
exec('git config user.username', function(err, stdout, stdrr) {
var show = stdout.trim()

if (show.match("new file mode") && show.match("commit"))
console.log("Changes have been committed!")
console.log("Changes have been committed!")
else console.log("Seems no changes \nhave been committed.")
}
})

0 comments on commit 0bfa328

Please sign in to comment.