Number | Command | Function |
1 | git config --global user.name "name"
git config --global user.email "E-mail" | Here we will configure the author name and email address to be used with your commits |
2 | Git init | Create a new local local respository |
3 | Git clone /path/to/repository | Create a working copy of a local repository |
4 | git clone username@host:/path/to/repository | For a remote server, use |
5 | git add <Filename>
git add* | This command will add one or more file to staging. |
6 | git commit -m "Commit message" | This will do commit changes to head |
7 | git commit -a | This command will commit any files that you have added with git add and also commit any files you have changed since then |
8 | git push origin master | This will send changes to the master branch of your remote repository |
9 | git status | This will list the files you have changed and those you still need to add or commit. |
10 | git remote add origin <server> | If you have not connected your local repository to a remote server, add the server to be able to push to it. |