码迷,mamicode.com
首页 > 其他好文 > 详细

"git add -A" is equivalent to "git add .; git add -u".

时间:2014-08-12 16:33:14      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:div   new   res   ad   file   ui   sp   rac   

  • git add -A stages All
  • git add . stages new and modified, without deleted
  • git add -u stages modified and deleted, without new
 
 
git init
echo Change me > change-me
echo Delete me > delete-me
git add change-me delete-me
git commit -m initial

echo OK >> change-me
rm delete-me
echo Add me > add-me

git status
# Changed but not updated:
#   modified:   change-me
#   deleted:    delete-me
# Untracked files:
#   add-me

git add .
git status

# Changes to be committed:
#   new file:   add-me
#   modified:   change-me
# Changed but not updated:
#   deleted:    delete-me

git reset

git add -u
git status

# Changes to be committed:
#   modified:   change-me
#   deleted:    delete-me
# Untracked files:
#   add-me

git reset

git add -A
git status

# Changes to be committed:
#   new file:   add-me
#   modified:   change-me

"git add -A" is equivalent to "git add .; git add -u".,布布扣,bubuko.com

"git add -A" is equivalent to "git add .; git add -u".

标签:div   new   res   ad   file   ui   sp   rac   

原文地址:http://www.cnblogs.com/guke/p/3907281.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!