git.rst
changeset 2082 7f6ce6b18a0c
parent 2081 0d9703b4a428
child 2084 376824d203c2
equal deleted inserted replaced
2081:0d9703b4a428 2082:7f6ce6b18a0c
   113 
   113 
   114 or::
   114 or::
   115 
   115 
   116   $ git reset badfile
   116   $ git reset badfile
   117 
   117 
   118 Doing changes.
   118 Committing changes
   119 ==============
   119 ==================
   120 ::
   120 
   121 
   121 Individual file::
   122   $ printf "clean:\n<TAB>rm $(wildcard *.o)\n" >>Makefile
   122 
       
   123   $ $EDITOR Makefile
       
   124   $ git add Makefile
   123   $ git diff
   125   $ git diff
   124   diff --git a/Makefile b/Makefile
   126   $ git commit -m "..."
   125   index e84f7e9..cd2438a 100644
   127 
   126   --- a/Makefile
   128 Commit all changed and previously manages files::
   127   +++ b/Makefile
   129 
   128   @@ -1,2 +1,5 @@
   130   $ git commit -a -m "...."
   129    all:
       
   130           @echo XXX
       
   131           exit 1
       
   132   +
       
   133   +clean:
       
   134   +       rm -f *.o
       
   135     $ git add Makefile
       
   136     $ git commit -m "Added clean target."
       
   137   Created commit 11272b9: Added clean target.
       
   138    1 files changed, 1 insertions(+), 0 deletions(-)
       
   139    create mode 100644 file
       
   140 
       
   141 or just::
       
   142 
       
   143   $ git commit -a -m "Added clean target."
       
   144 
   131 
   145 git analog of 'hg incoming'.
   132 git analog of 'hg incoming'.
   146 ============================
   133 ============================
   147 
   134 
   148 git does not directly support such feature. You can emulate it by::
   135 git does not directly support such feature. You can emulate it by::