1, (first into the project folder) by command git init to turn this directory into a repository that git can manage
Git init
2. Add the file to the repository, using the command git Add. Add to staging area inside, don't forget the decimal point ".", meaning to add all the files under the folder
git Add.
3. Use the command git commit to tell git to submit the file to the repository. In quotation marks for submission instructions
' First commit '
4. Associating to remote libraries
Git remote add origin your repository address
Such as:
Git remote add origin https://github.com/cade8800/ionic-demo.git
5, get remote library and local synchronization merge (if the remote library is not empty must do this step, or the subsequent commit will fail)
Git pull--rebase Origin master
6, push the contents of the local library to the remote, using the git push command, actually pushes the current branch master to remote. After executing this command, you will be asked to enter a user name, password, and upload after verification.
Git push-u Origin Master
*, status Query command
git status
Please refer to http://www.cnblogs.com/tugenhua0707/p/4050072.html for details.
How to upload a local project to git with commands