Hi Hajar,
Here are a few relevant articles I wrote which will be relevant to you getting started:
Getting Started with Moodle Development
https://www.tngconsulting.ca/getting-started-moodle-development/
Getting Started with Moodle Development - Your first Moodle block
https://moodle.org/mod/forum/discuss.php?d=355789
Developing a new plugin
https://moodle.org/mod/forum/discuss.php?d=352360#p1429639
As for cloning Moodle using
GIT, you actually clone a repository. This includes every version of Moodle since the beginning of time. Then you checkout a branch (the version of Moodle you want to work on). So, for example, if you wanted to clone Moodle and work on Moodle 3.6, you would:
cd path_to_your_webroot
git clone git://git.moodle.org/moodle.git
cd moodle
git branch --track MOODLE_36_STABLE origin/MOODLE_36_STABLE
git checkout MOODLE_36_STABLE
This will setup the Moodle files for the latest release of Moodle 3.6, not Moodle 3.6.2. Nobody will ever let you submit a change to a past minor release.
You don't normally want to modify the core Moodle code unless you are fixing a bug or creating new functionality. I would suggest you familiarize yourself with the Moodle code/
database and how it works before tackling such changes. When you do start working on Moodle core issues, you will want to fork (clone) a copy to your own GitHub account first. This is because you cannot contribute directly to the Moodle project. You will need to create a copy of the branch, make your changes, commit them, push them to your GitHub repository fork and submit an issue in the
Moodle Tracker. When it comes time to integrate the changes, you will need to submit the change for all currently supported versions of Moodle.
There was a little talk about editors. I use PHPStorm ($$) however I have also used Sublime Text and NetBeans for debugging. For editing without a debugging, I often use Notepad++ which work really well for Moodle's large library files. Recent versions of VSCode have improved in terms of handling large PHP files. For more ideas, see
https://www.cloudways.com/blog/top-ide-and-code-editors-php-development/ .
Regardless of which editor you end up using, you will need to setup XDEBUG or XDEBUG. It's a pain to setup. There are others like the Zend Debugger, but most people I know have settled on XDEBUG for PHP development.
I really recommend that you learn how to use GIT from the command line. It is a VERY powerful tool and I have yet to see any IDE which implements all of its functionality. Eventually, you will reach a point where you need to do something and it will only be possible from the command line. GIT for Windows will not only give you the GIT command in Windows, it also gives you a BASH prompt so you can brush up on your Linux command line and a GUI interface. This is what I used when I first started. That lasted about a month before I abandoned the GUI and started using the command line. Besides, all of the instructions and examples for GIT are command line based. Think of it, By using a GUI or IDE, you actually are adding a layer of complexity because you need to figure out how to do what they are showing you using your graphical user interface.
What kind of Moodle development are you planning on doing? A theme, block, activity module, filter, local, etc? If you can share what type of development you are planning on doing, we can probably give you additional advice. For example, there are developer tools specifically geared towards theme development that might be worth mentioning.
Hope this helps.
Best regards,
Michael