Skip to content

Instantly share code, notes, and snippets.

@dpshelio
Created October 10, 2012 20:00
Show Gist options
  • Save dpshelio/3868042 to your computer and use it in GitHub Desktop.
Save dpshelio/3868042 to your computer and use it in GitHub Desktop.
How to separate the pull request into two different ones
# From the master branch I create one to test Steve pull request
git checkout -b steve
# I fetch all that ehsteve has in his branch
git remote add
git fetch -v ehsteve
# Merge Steve pull request with master
git pull ehsteve master
# Run the tests
py.test sunpy
#!!! 3 of them fails!
# sunpy/tests/spectra/test_spectrogram.py FFF..................................
# See the different files between the two branches
git diff --name-status master..steve
#M doc/source/guide/index.rst
#A doc/source/guide/plotting.rst
#A sunpy/data/examples/flare_spectrum.txt
#M sunpy/io/__init__.py
#M sunpy/map/map.py
#M sunpy/map/sources/soho.py
#A sunpy/map/util.py
#M sunpy/spectra/spectrogram.py
#M sunpy/spectra/spectrum.py
#A sunpy/sun/examples.py
#M sunpy/wcs/wcs.py
#change to the master branch
git checkout master
#create a new branch with just the separate pull request
git checkout -b stevenew
#checkout just these files that we want...
git checkout steve doc/source/guide/plotting.rst doc/source/guide/index.rst
#Check the status to be sure we are doing the right thing
git status
#Commit changes
git commit -m 'merge files we wanted with a better plotting guide'
#push the changes to my repository
git push -u origin stevenew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment