[FE training-materials-updates] labs/kernel-module-simple: don't use git add -A

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu May 26 07:45:54 CEST 2016

Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=da77f9a8b4e49d2e2542298233b0c9c480bd34ad


commit da77f9a8b4e49d2e2542298233b0c9c480bd34ad
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Tue May 24 11:54:10 2016 +0200

    labs/kernel-module-simple: don't use git add -A
    Using 'git add -A' is a terrible thing to teach people. Tell them to
    use 'git add' explicitly on the files to be added.
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


 labs/kernel-module-simple/kernel-module-simple.tex | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/labs/kernel-module-simple/kernel-module-simple.tex b/labs/kernel-module-simple/kernel-module-simple.tex
index 5ccdef5..1c2aff1 100644
--- a/labs/kernel-module-simple/kernel-module-simple.tex
+++ b/labs/kernel-module-simple/kernel-module-simple.tex
@@ -122,20 +122,15 @@ appropriate commit message):
 cd ~/linux-kernel-labs/src/linux
-git add -A
+git add <files>
 git commit -as
-\item \code{git add -A} adds (or removes) files to the next commit
-      (except for files explicitly ignored, such as generated ones).
-      Another, perhaps safer way to do this without taking the risk
-      to add unwanted files, is to run \code{git status} and explicitly
-      run \code{git add} on each of the files that you want to
-      add to the next commit.
+\item \code{git add} adds files to the next commit. It is mandatory to
+  use for new files that should be added under version control.
 \item \code{git commit -a} creates a commit with all modified files
-      (at least the ones tracked by the repository) since the previous
-      commit.
+  that already under version control
 \item \code{git commit -s} adds a \code{Signed-off-by:} line to the
       commit message. All contributions to the Linux kernel must have
       such a line.

More information about the training-materials-updates mailing list