Giter Club home page Giter Club logo

developers-november-2016's Introduction

GitHub for Developers

  • November 9-10, 2016
  • Facilitators:
    • Cynthia Rich (@crichID)
    • Briana Swift (@brianamarie)

Talk to us

Join us on Gitter to get help and answers to your questions: Join the chat at https://gitter.im/githubteacher/developers-november-2016

Resources

After Class

Please take our short survey and let us know what you thought of today's class: https://goo.gl/US2sKk

Scripts for Adding Files

You will need these on day 2, so keep them handy ๐Ÿ˜‰

  • Bash: for d in {1..6}; do touch file$d.md; git add file$d.md; git commit -m "adding file $d"; done
  • PowerShell: for ($d=1; $d -le 6;$d++) { touch file$d.md; git add file$d.md; git commit -m "adding file$d.md";}

Playgrounds for practicing branching

Adding the Git branch to your command prompt

This is one of our most requested command line secrets, so here it is. To show your active Git branch in your command prompt, you will need to do the following:

  • If you are on a Mac, you can add the code shown below to your .bash_profile file.
  • If you are on Linux, you will add the code shown below to your .bashrc file.
  • If you are on Windows, you probably aren't reading this because Windows provides this behavior by default.

The Script

parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\w\[\033[36m\]\$(parse_git_branch) \[\033[00m\] > "

Or, another option:

function parse_git_branch () {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
 
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOR="\[\033[0m\]"
 
PS1="$GREEN\u@\h$NO_COLOR:\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ "

developers-november-2016's People

Contributors

githubteacher avatar gitter-badger avatar

Watchers

James Cloos avatar Bruce McFarland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.