Ask Your Question
4

First steps to gitHub, need some help adding bugfixes

asked 2013-07-15 07:55:50 -0500

Let's say I would like to help out, with for example reducing the amount of bugs in documentation. I have found a bug in the openCV dev area and am going through the steps suggested at 'How to contribute'.

And there I loose what to do next :) Following these instructions:

  1. Choose a base branch for your work.
  2. Create a new branch (with a meaningful name) from the base branch you chose.
  3. Modify/add the code following our Coding Style Guide.
  4. When you are done, push your branch to your GitHub fork; then create a pull request from your branch to the base branch.

First of all, how do I choose the branch for my work when using Windows & TortoiseGIT? What I did now is creating a folder on my root, rightclick 'clone git', adding my GitHub fork of openCV and setting my branch to 2.4. Then it synchronizes for some time. Is this correct?

image description

Next I need to create a new branch, and being new to this all, I find no way in doing so. Do you do this on your system or online at the GitHub site? Can someone point me in the correct direction?

About modifying the files, in my case documentation, it seems to be LaTeX files, which I can work with, but I have trouble locating the correct files in my file structure. Where should I look for these files exactly?

Pushing back my branch when adapted, can someone guide me on how to do that exactly.

These are merely the steps I cannot find amongst the guides, leading me to problems going further. Maybe if the solutions are added here, someone could update the contribute guide.

edit retag flag offensive close merge delete

Comments

2

seems all well, so far. the missing buttons are in the context menu_Context_menu) for your cloned folder. (right click)

  • make 1 new branch for every planned pull request
  • do your changes, and commit
  • push back to your github
  • on the website, press the 'pull request' button
berak gravatar imageberak ( 2013-07-15 09:02:55 -0500 )edit

And you have a clue on which files to edit for documentation? So far I have found where source code is, but not the documentation part :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-15 09:12:02 -0500 )edit
1

i think it gets generated from the .rst files in the module/doc folders, e.g. here

berak gravatar imageberak ( 2013-07-15 09:18:23 -0500 )edit
2

I think OpenCV needs better tutorials for this kind of stuff

yes123 gravatar imageyes123 ( 2013-07-15 09:35:10 -0500 )edit

@yes123 i could not agree even more :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-15 12:25:50 -0500 )edit

Hi, guys! It's really a hot topic (as you can see, the "history" of "How to contribute" page is frequently updated last time)! If you have some experience with git, it's not a problem to make a pull request to OpenCV with current instruction, but adding illustrated instruction for some popular clients is a good idea (something like answer (http://answers.opencv.org/question/6495/visual-studio-2012-and-rtlfreeheap-error/?answer=6603#post-id-6603) by @Hongbo Miao). These tutorials can be placed at the bottom of "How to contribute" page. Will anyone join this work?

Daniil Osokin gravatar imageDaniil Osokin ( 2013-07-15 13:09:08 -0500 )edit
1

I can help you create a tutorial for tortoiseGIT & Windows 7 if you want to. After that send them to you by mail or?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-15 13:17:27 -0500 )edit
1

Hi, Steven! Great! I'm think, it will be useful, if you add a question here and post the answer on it, like in link above. I will update "How to contribute" page with this answer.

Daniil Osokin gravatar imageDaniil Osokin ( 2013-07-15 13:23:49 -0500 )edit

I will post it here as an answer tomorrow :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-15 13:53:53 -0500 )edit
1

Ok, looking forward to!

Daniil Osokin gravatar imageDaniil Osokin ( 2013-07-15 14:03:48 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
8

answered 2013-07-16 04:07:28 -0500

updated 2013-07-16 06:16:13 -0500

Specific instructions to contribute for Windows 7 & TortoiseGIT

System configuration

  • Windows 7 x64 bit operating system
  • GIT 1.8.1 & TortoiseGIT 1.8.4

Prerequisites

  1. Register at GitHub
  2. Download & install GIT
  3. Download & install TortoiseGIT

First configure your GitHub page to fork the original openCV repository.

  1. Go to GitHub
  2. Open the Itseez OpenCV page
  3. Press the fork icon on the right hand top side of the page.

image description


Create a folder on your system to sync up the openCV source code from your fork

  • Create a folder named 'opencv_source' in your systems root path (or your own selection)
  • Right click on the folder, selecting the Git Clone option

image description

  • Fill in the proper information into the configuration panel. Replace my username with your GitHub username and remove the extra opencv folder that is added to the directory structure.

image description

  • Press OK and let the folder sync up, until full synchronization has passed.

image description


Create a new branch on your Git repository, to apply changes. Do not forget to create a new branch for every single update you want to do! These branches are local, but will be pushed to github after editing the source code.

  • Right click on folder
  • Select TortoiseSVN > Create Branch

image description

  • Select the correct options, choose a correct name for your branch, base it on the master branch for complete new functionality, or for minor fix, base it on 2.4 branch.

image description

  • Hit the OK button and let it configure your repository. Changes might not change immediatly on the GitHub page, because it sync's in a lapsed time interval. Don't worry about that.

image description


Select the file you want to adapt (in our case I will illustrate adding an extra comment to a source code file), adapt the the file accordingly and commit it to your GitHub repository.

  • In your configured GitHub folder on your machine, adapt the file you want.
  • In our case, we open up the file C:\opencv_source\apps\traincascade\traincascade.cpp
  • Add your lines of code to the source code.

image description

  • Save the file so that your adaptations are stored onto the system.
  • Your folder will indicate that a change has been made, by placing an exclamation mark.

image description

  • Commit your adapted file to GitHub by selecting the commit->bugfix_1 option.

image description

  • The first time, the system will ask you to input your username and email, giving the following warning. Press Yes, fill in credentials and press OK.

image description

image description

  • A commit window of TortoiseGIT will appear, showing you the files that were adapted. It requires you to give a complete but brief description of your adaptation, then allows you to push the file. Select only the files you want to commit to the repository!

image description

  • At the next window, explicitly tell the software to push the adaptations!

image description

  • An interface will pop up to push the data and local branches (which you made earlier). Be sure to select the option to push all branches.

image description


Your system is now all sync'd up with GitHub, lets make sure by checking.

  • The branch you created for ...
(more)
edit flag offensive delete link more

Comments

++ very nice.

berak gravatar imageberak ( 2013-07-16 04:27:49 -0500 )edit

Anyone has an idea on what to do next? It seems that using the create branch only creates it locally and not on github. Dont mind the documentation folder, it is something is still want to get removed (not knowing howto also...). I have no idea what to configure now, which remote to select to push my data. Any help?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 04:41:10 -0500 )edit

@Daniil Osokin : have any clue what is going wrong here?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 05:10:45 -0500 )edit

I have found what went wrong, will continue updating :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 05:17:11 -0500 )edit

Guide is finished! This actually worked on my windows system, hope that someone gets the time to create exactly the same for Linux and MacOSx, but I have no experience in both.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 06:18:03 -0500 )edit
2

Steven, terrific!

Daniil Osokin gravatar imageDaniil Osokin ( 2013-07-16 07:29:15 -0500 )edit
1

Awesome steven!

yes123 gravatar imageyes123 ( 2013-07-16 13:31:04 -0500 )edit
1

Thanks for putting it up :) Maybe a remark, I think it would be good to place the practical guides above the schedule for pull request processing, since people have to scroll down quite a bit to know they are there. Also if possible, just place links on main page for each operating system, then push them to a new seperate page? This will keep the lenght of the HOW TO page limited :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-17 02:22:50 -0500 )edit
1

also that guide should give credits to steven for his effort

yes123 gravatar imageyes123 ( 2013-07-17 05:54:38 -0500 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2013-07-15 07:55:50 -0500

Seen: 843 times

Last updated: Jul 16 '13