First, the remote created an empty warehouse repository, will be shown below guide, we follow push an existing repository from the command line instructions, we supplement the complete steps.
-
Terminal in cd into the appropriate directory project
cd /Users/yuanjilee/Desktop/DEMO/ErrorTracking
-
.Git initialization file
git init // 目录下创建好后 cmd + Shift + . 就可以看到已经生成了隐藏的 .git 文件夹,config 是其配置文件
-
Associated with the remote copy ssh path github, provided you set up ssh login
git remote add origin [email protected]:yuanjilee/ErrorTracking.git
-
Submit code to the staging area
git add .
-
commit the code
git commit -m "init"
-
Pushed to the remote repository
git push -u origin master
You can modify the configuration parameters of a respective own.
Reproduced in: https: //juejin.im/post/5d0b9737f265da1b855c5d0e