Workflow after setting everything up

If this is your first time running these commands, please scroll down to the heading "First time" to get your repo setup. After that, you'll want to refer to these instructions. As always, feedback and pull requests are encouraged!


In [24]:
!git fetch upstream


remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From git://github.com/jbwhit/jupyter-best-practices
   b8c8944..3485e0f  master     -> upstream/master

In [25]:
!git merge upstream/master master


Updating e9e4059..3485e0f
Fast-forward

In [38]:
branch_name = "test-feature"

In [27]:
%%bash

git branch $branch_name upstream/master
git checkout $branch_name
# git push --set-upstream origin 
# git push --set-upstream your-github-username my-new-feature


M	notebooks/github-integration.ipynb
Your branch is up-to-date with 'remotes/upstream/master'.
Branch master set up to track remote branch master from origin.
Branch test-feature set up to track remote branch test-feature from origin.
To git@github-svds:jonathan-svds/jupyter-best-practices.git
   e9e4059..3485e0f  test-feature -> test-feature

In [29]:
!git status


On branch test-feature
Your branch is up-to-date with 'origin/test-feature'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   github-integration.ipynb

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	.ipynb_checkpoints/

no changes added to commit (use "git add" and/or "git commit -a")

In [16]:
!git add ../data/*

In [17]:
!git status


On branch test-feature
Your branch is up-to-date with 'upstream/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	new file:   ../data/coal_prod_2002.csv
	new file:   ../data/coal_prod_2003.csv
	new file:   ../data/coal_prod_2004.csv
	new file:   ../data/coal_prod_2005.csv
	new file:   ../data/coal_prod_2006.csv
	new file:   ../data/coal_prod_2007.csv
	new file:   ../data/coal_prod_2008.csv
	new file:   ../data/coal_prod_2009.csv
	new file:   ../data/coal_prod_2010.csv
	new file:   ../data/coal_prod_2011.csv
	new file:   ../data/coal_prod_2012.csv

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	./


In [35]:
!git add *
!git status


On branch test-feature
Your branch is up-to-date with 'origin/test-feature'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	modified:   Insight-demo.ipynb
	modified:   github-integration.ipynb

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	.ipynb_checkpoints/


In [36]:
!git commit -am "Update github-integration -2"


[test-feature 0f1813e] Update github-integration -2
 2 files changed, 42 insertions(+), 54 deletions(-)

In [37]:
!git push origin $branch_name


error: src refspec workflow-update does not match any.
error: failed to push some refs to 'git@github-svds:jonathan-svds/jupyter-best-practices.git'

In [34]:
!git checkout master


error: Your local changes to the following files would be overwritten by checkout:
	notebooks/github-integration.ipynb
Please, commit your changes or stash them before you can switch branches.
Aborting

Now it's time to go to your github page and submit your pull request!

First time

If this is your first time running this code, this is the section for you!

  1. Get a github account if you don't already have one
  2. Go to https://github.com/jbwhit/jupyter-best-practices
  3. Fork the repo (so you have a linked-clone in github)
  4. The below instructions have you clone your forked version of my repo
  5. If you make changes and push them (to an appropriate branch), you can then submit a pull request and I'll merge it back into the main repo.

In [22]:
github_username = "FILL IN YOUR GITHUB USERNAME HERE"

In [ ]:
%%bash
git clone git@github.com:/$github_username/jupyter-best-practices.git
cd jupyter-best-practices
git remote add upstream git://github.com/jbwhit/jupyter-best-practices.git