NO1. CD to the root of your project, then execute git command, create warehouse
Git init
NO2. Add all files in the project to the warehouse
git Add.
Or
git add--all
NO3. Submit the Add file to the warehouse
Git commit
Enter your submission comment (hold I start input, ESC complete input,: Wq exit Input)
Then you will be prompted to enter GitHub's account number and password.
NO4. Create your own warehouse on the GitHub
Once created, it will have its own warehouse, copy the warehouse address
No.5 the local warehouse to its own github
Git remote add origin your warehouse address
No.6 pull
Git pull Origin Master
An error occurred
Fatal:refusing to merge unrelated histories
Perform
Git pull Origin master--allow-unrelated-histories
No.7 upload code to GitHub remote warehouse
Git push-u Origin Master
Then, code upload successful
Finally, I enclose my first work: Https://github.com/SexiZhang/PJSIP