Tasks

Git intro:

  1. Create an account on https://github.com/ (if you don't have one).
    • Add the public key from your computer at account settings/ssh keys (for ssh login)
    • Configure your username, email and colors
      git config --global user.email "me@here.com"
      git config --global user.name "John Doe"
      git config --global color.branch auto
      git config --global color.status auto
      git config --global color.diff auto
    • Clone this repo: git clone git@github.com:iriina/GitDemo.git
  2. Try some git commands:
    • Create a new file, add it to index, commit it and push it in the repo.
    • After each command call git status and look at the changes.
    • Generate a conflict with one of your colleague and solve it using the stash method:
      • Both modify the same file at the same place.
      • One of you commit and push the changes.
      • The other one follow the steps below:
        • Add your modifications to index git add; git status
        • Stash your changes in order to retrieve possible conflicting updates git stash; git status
        • Get the updates from the server git pull and manually solve any possible merge conflicts.
        • Commit the final results and push them to the server.

The following steps will guide you through the process of making a patch for the Linux Kernel.

# Clone linux-next tree #* git clone git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

  1. Setup git
    • git config –global user.name “Firstname Lastname”
    • git config –global user.email “your_email@youremail.com”
    • git config –global sendemail.smtpserver smtp.gmail.com
    • git config –global sendemail.smtpserverport 587
    • git config –global sendemail.smtpencryption tls
    • git config –global sendemail.smtpuser your_email@gmail.com
  2. Patch creation workflow
    • Create development branch
      • git branch fixes
      • git checkout fixes
    • Create patch (see next item)
      • git add <file>
      • git commit -s
      • Add a good commit message and a Signed-off-by line.
      • git format-patch -1
      • ./scripts/checkpatch.pl name.patch
      • ./scripts/get_maintainer.pl name.patch
    • Send patch
      • git send-email -to=maintainer_email_addres -cc=adresa_email1 -cc=adresa_email2
  3. How can I get something to fix
    • checkpatch.pl
      • chose a file and check for errors: /usr/src/linux/scripts/checkpatch.pl –no-tree -f file
    • sparse
      • make C=1 <subsystem>
sesiuni/kernel/final.txt · Last modified: 2012/07/13 18:49 by dbaluta