How to commit and push all changes, including deletes?

前端 未结 6 872
渐次进展
渐次进展 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:07

    You will have to do git add -A to add all files new files, changes and removed files. Than follow that up with git commit and git push

    0 讨论(0)
  • Combine all needed separate commands in one alias?!

    0 讨论(0)
  • Can you please try the following git commit -a

    0 讨论(0)
  • 2021-02-02 16:13

    Use the following commands-

    1. git add -A to add all files new files, changes and removed files.
    2. git commit -m "Your message" to save the changes done in the files.
    3. git push -u origin master to send your committed changes to a remote repository, where the local branch is named master to the remote named origin
    0 讨论(0)
  • 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 <pathspec>. This removes as well as modifies index entries to match the working tree, but adds no new files.
           If no <pathspec> 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).
    
    0 讨论(0)
  • 2021-02-02 16:29

    please follow these command git commit -am "message" (to add and commit in single command) git push origin [branch Name]

    0 讨论(0)
提交回复
热议问题