Skip to content

Files

Latest commit

 

History

History
 
 

class05

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

#Flex class!

Git Best Practices - Assignment

In the real world (and in this class), it's not good practice to commit directly to the master branch. If a real project is under version control, committing a bug to master could break live code. The master branch is generally reserved for code that has been tested and shown to work in a branch.

  1. Create a new branch on your olinjs repository.
$ git checkout -b branchname
  1. Commit something on the branch.
  2. Pull request that branch to master on your fork of olinjs/olinjs on GitHub.
  3. We will comment on the pull request and give you a grade (out of 1).
  4. We will close the pull request.

.gitignore

This is the directory structure of the olinjs repo.

.
├── .git
├── .gitignore
├── README.md
├── classes
├── finalproject
├── lab1
├── lab2
└── lab3

6 directories, 2 files

The .gitignore file lives in the root directory of the git repository. Each line is a pattern for a file to ignore.

.gitignore
# Logs
**/logs
**/*.log

# Runtime data
pids
**/*.pid
**/*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
**/lib-cov

# Coverage directory used by tools like istanbul
**/coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
**/.grunt

# node-waf configuration
**/.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
**/build/Release

# Dependency folders
**/node_modules

# Debug log from npm
**/npm-debug.log

# For Mac users without global gitignore
# http://islegend.com/development/setting-global-gitignore-mac-windows/
**/.DS_Store

This is worth perusing but we won't cover it in detail now. Your .gitignore can be as simple as:

.gitignore
node_modules

Which will ignore the node_modules folder — standard for a Node repository.