Linux kernel : Kernel version string appended with either ''+“ or ”-dirty”

I am trying to install latest kernel from git of Linus Torvalds, i.e., version 3.16-rc7. I have created a new branch by following using following commands:
git checkout -b v_3_16 v3.16-rc7
Then I checkout on the branch v_3_16 and fire following commands
make menuconfig and check the option CONFIG_LOCALVERSION_AUTO because I need the version string to be updated.
But I cannot understand why does this append “+” or “-dirty” (when CONFIG_LOCALVERSION_AUTO is disabled) to the version string.
I have checked out for uncommited changes using git commit -a but it says nothing to commit.

  • Is there a way to re-order Git stashes?
  • What is the git equivalent of of hg outgoing (hg out) or hg incoming (hg in)?
  • Git: Download zip instead of clone, now cannot commit
  • How to make a patch ignore the file index using “git apply”?
  • git push to remote master branch
  • How to use git branches for project features?
  • Stash changes to specific files
  • In which branch should I build a docker image?
  • Git multiple repositories in Visual Studio
  • Nodegit Remote Push with --force
  • What are scenarios in which 'git stash' might fail?
  • Why does Heroku think everything is up-to-date when it isn't?
  • 2 Solutions collect form web for “Linux kernel : Kernel version string appended with either ''+“ or ”-dirty””

    If Linux kernel images are being built with “-dirty” on the end of the version string, this simply means that modifications in the source directory have not been committed. Use git status to check for uncommitted files.

    When you see the dirty string, it appends the kernel version string with the last abbreviated commit id + dirty to the kernel version.

    You can use the above Git command to report modified, removed, or added files. You should commit those changes to the tree regardless of whether they will be saved, exported, or used. Once you commit the changes, you need to rebuild the kernel.

    To force a pickup and commit of all such pending changes, enter the following:

     $ git add .
     $ git commit -s -a -m "getting rid of -dirty"

    Alternatively, use the make -j2 LOCALVERSION="-customstring" to get the custom string

    “Create an empty .scmversion file in the root of the kernel sources.”

    Git Baby is a git and github fan, let's start git clone.