Skip to content
alexposukhov edited this page Dec 27, 2022 · 5 revisions

Welcome to the gl_kernel_BaseCamp_2022_II wiki!

Commit naming convention

Please use the following rule to create commit message

<TAG>: <Action> <Short description>    // - commit title
                    // - empty line
<Detailed description>          // - detailed description of you changes

<TAG> - usually this is task you performed ("TASK01")
<Action> - usually describe change in the commit ("Add", "Change", "Modify", "Remove", "Fix", etc)
Please pay attention that Action is used in "imperative mood".

<Short description> - What was done
<Detailed description> - More details about change

More info could be found here:
https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html?highlight=imperative%20mood#describe-your-changes

How to fork your the repository

Press fork button on a main page of repository you want to fork

fork

How to perform development

Clone your forked repository

$git clone [email protected]:Kernel-GL-HRK/gl_kernel_BaseCamp_2022_II.git

Check remotes for your repository

$cd gl_kernel_BaseCamp_2022_II
$git remote --v
origin [email protected]:yourname/gl_kernel_BaseCamp_2022_II.git (fetch)
origin [email protected]:yourname/gl_kernel_BaseCamp_2022_II.git (push)

Add remotes for your repository

$git remote add procamp [email protected]:Kernel-GL-HRK/gl_kernel_BaseCamp_2022_II.git
This action allows you to update your local main branch to sync new tasks.
$git checkout main   <- switch your local branch
$git pull procamp   <- your local main branch will be updated with latest changes in main bra of Kernel-GL-HRK repository

How to make your homework

Decide which task your are going to implement Create branch from the appropriate task commit in your local main branch
For example you are going to implement task 3
$git pull procamp main   <- pull latest changes from Kernel-GL-HRK/gl_kernel_BaseCamp_2022_II repository in your local main branch
$git log --oneline ba6acd8 (HEAD -> main, origin/main, origin/HEAD) Task04: Add task for Lection 03
671ce49 TASK3: Add module task
db09a10 TASK2: Add bash task
ad87954 TASK1: Add git task
c9bdf80 Initial commit

Your homework should be performed in a separate branch which is created from the proper commit:
$git branch 03_Module_HomeWork 671ce49   <- create new branch based on commit 671ce49 TASK3: Add module task
$git branch
03_Module_HomeWork
* main
This action allows minimizing the commits number in your pull request.

Switch to a new branch, provide your changes and push them into you forked repository

Check codestyle

Please check your file before creating pull request with code-stile checker
Script is located in kernel/scripts directory: buildroot-2021.02.7/output/build/linux-5.10.7/scripts$
run it with --no-tree and -f options for your files
./checkpatch.pl --no-tree -f ~/path/to/file/sysfs_mod.c

Push hometask

git push origin    <- new branch will appear in your forked repository

Create pull request

Your pull request should be created from the branch with your hometask to your personal branch in Kernel-GL-HRK/gl_kernel_BaseCamp_2022_II repository, not to main branch
Please set label "Ready for review" to indicate your changes are ready.