gpilab / core-nodes

The core nodes are a collection of basic data manipulation and visualization algorithms.
http://docs.gpilab.com/en/develop/NodeDev/devguide.html
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

Reshape fails for # dimensions with 2 digits #6

Closed michaelschar closed 4 years ago

michaelschar commented 8 years ago

Hi,

small bug fix in our fork for commit # 16521d04fcfabfd1a8c0c40cbe5a0f3195173bb1.

In case the commit # is not sufficient, here the line of code that changed:

line 466 in Dimensions_GPI.py

Is there a way to do a pull request for certain commits only rather than all of them?

best Gabri and Mike

aganders3 commented 8 years ago

Hi Mike,

Great work! There isn't a simple way to specify which commits. You need to create another branch to do it: http://stackoverflow.com/questions/25955822/git-cherry-pick-a-single-commit-for-pull-request

Thanks!

michaelschar commented 8 years ago

Thanks, I gave that a try.. in github I made a now fork of bni_core I used SourceTree to make a local clone. Then in a command window I did:

git fetch origin

git reset --hard origin/HEAD

git cherry-pick 16521d0

but then I got:

fatal: bad revision '16521d0'

Using the full length commit number gave me this:

fatal: bad object 16521d04fcfabfd1a8c0c40cbe5a0f3195173bb1

anything obvious I'm doing wrong?

On Thu, Mar 10, 2016 at 4:04 PM, Ashley Anderson notifications@github.com wrote:

Hi Mike,

Great work! There isn't a simple way to specify which commits. You need to create another branch to do it:

http://stackoverflow.com/questions/25955822/git-cherry-pick-a-single-commit-for-pull-request

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/gpilab/core-nodes/issues/6#issuecomment-195048559.

Michael Schär, PhD Division of MR Research, Department of Radiology, Johns Hopkins University Park Bldg 330, 600 N. Wolfe St., Baltimore, MD 21287 Phone: +1 410 929 0918 mailto:michael.schar@gmail.com

aganders3 commented 8 years ago

It sounds like maybe you're (understandably) getting branches and forks mixed up. Git keeps track of branches within each repository, while forks are really a GitHub thing with no official standing in git (in git a fork is no different from any other clone).

I don't normally use SourceTree, but I think this is how you'd do it:

1) Enter your existing repository and click the Branch+ button (red circle). That will give you the popup you see. 2) Give your new branch a name (maybe a name related to the feature). 3) Pick the last commit in common with our develop branch (before you started making changes as the starting point for the branch. 4) Create the branch and check it out. 5) Now cherry-pick the commit you want (16521d0) onto your new branch. 5) Push that branch to the GitHub remote for your fork (michaelschar/core-nodes). 6) Create a pull request for that branch against our develop branch. screenshot 2016-03-10 16 19 36