How to commit and push all changes, including deletes?

前端 未结 6 889
渐次进展
渐次进展 2021-02-02 15:53

How to commit and push all changes, including additions, editions, and file deletions etc in one command?

6条回答
  •  滥情空心
    2021-02-02 16:13

    As I understand your question you are asking about "-u" option used as below which will add all already existing in repo entries (but no new ones):

    git add -u
    

    which accordingly to man pages:

       -u, --update
           Update the index just where it already has an entry matching . This removes as well as modifies index entries to match the working tree, but adds no new files.
           If no  is given when -u option is used, all tracked files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories).
    

提交回复
热议问题