Unable to commit to forked ITK repo on github

github
git
github-desktop

(Gordian) #1

Hello,

i have trouble to commit to my fork of the ITK. I would like to try and share my changes in my local group before making a pull request.

I forked the ITK repo and cloned the fork to have a local copy. Afterwards I created a new branch for local development. My local clone is from the forked repo. The origin is my fork, the upstream repo is the Insight ITK repo. The response to
git remote -v is

origin   https://github.com/kabcode/ITK.git (fetch)
origin   https://github.com/kabcode/ITK.git (push)
upstream https://github.com/InsightSoftwareConsortium/ITK.git (fetch)
upstream https://github.com/InsightSoftwareConsortium/ITK.git (push)

I get the following error message:

itk_commit_error

Using the console i get the same error.

Can I turn this behavior off and how? Or do have a misunderstanding how the forks work on git (as my own repository)?


(Francois Budin) #2

Hello @Gordian,

It is probably a good thing to run this script to set up your environment properly. You only need to run this command once. After that, you should not see this message appear again.

If you want to bypass this check, you should be able to run:

git commit -n


(Gordian) #3

Hi and thanks for the fast response.

The way to bypass the commit works fine but I am not sure what I am missing out.

I did run the script once before (in the git bash on Windows 7) but it gave me another error. The other error wanted to use /usr/bin/bash or something like that.
I need to check this again some time.

In the clone of the ITK-4.13 I run this script and it worked fine to commit local changes (but could not push because I am no contributor to the ITK).


(Francois Budin) #4

@Gordian : Do you happen to know the error message you got on Windows when running the script?

The script sets some things up such as hooks that verify that the commit respects some rules (e.g. the first line of the git commit must start with one of the code that is allowed), and also adds some git aliases to facilitate using git when developing ITK.

There is no restriction on who is an ITK developer. You are more than welcome to actually create pull requests for ITK if you correct bugs or improve ITK. The way to do it is to push the modifications in your own repository under a new branch and then to create an pull request on the main ITK github repository. More information is available about this here. Hope you start contributing :slight_smile: