How to add multiple files to Git at the same time

后端 未结 10 625
半阙折子戏
半阙折子戏 2021-01-29 18:12

This will be my first git use. I have added new files ( a lot ) to the folder/project ( git local repository).

I went through online tutorials and forums and see i can do

10条回答
  •  清酒与你
    2021-01-29 18:26

    When you change files or add a new ones in repository you first must stage them.

    git add 
    

    or if you want to stage all

    git add .
    

    By doing this you are telling to git what files you want in your next commit. Then you do:

    git commit -m 'your message here'
    

    You use

    git push origin master
    

    where origin is the remote repository branch and master is your local repository branch.

提交回复
热议问题