Skip to content

Instantly share code, notes, and snippets.

@lcherukuri
lcherukuri / terminal-git-branch-name.md
Created April 18, 2020 20:38 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@lcherukuri
lcherukuri / gh-pages-deploy.md
Created August 26, 2019 20:32 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

import Ember from 'ember';
import Table from 'ember-light-table';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
const table = new Table([{
label: 'Foo',