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
Use the git add command, followed by a list of space-separated filenames. Include paths if in other directories, e.g. directory-name/file-name.
git add file-1 file-2 file-3
You can also select multiple files like this
git add folder/subfolder/*
This will add all the files in the specified subfolder. Very useful when you edit a bunch of files but you just want to commit some of them...
If you want to add multiple files in a given folder you can split them using {,}. This is awesome for not repeating long paths, e.g.
git add long/path/{file1,file2,...,filen}
Beware not to put spaces between the ,.
Simply use single quotations around each file name to ensure any with spaces work as expected
git add 'file1' 'file2' 'file3'
When you change files or add a new ones in repository you first must stage them.
git add <file>
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.