首页 » git

git commit 报 nothing added to commit but untracked files present ,git ,看来git add -A 和 git add . 的区别,git add . 只会加已经track的working tree,而git add -A 根路径下的全部

1.首先尝试,发现不起作用

git add .
git status

2.使用如下,发现其作用了

git add --all
  1. summary--- git add -A 等于 git add . 加 git add -u
    git add -A stages all changes

    git add . stages new files and modifications, without deletions

    git add -u stages modifications and deletions, without new files

之前一直用git merge 很少使用git rebase,最近看了下他们的区别

1.git merge 和git rebase 都会生成一个新的commit,但是git merge会保留之前的本地提交,而git rebase不会保留

2.由于git rebase没有记录合并历史,所以对于同一个冲突,每次rebase都需要重新解决一遍。