向GitHub仓库推送(push)本地文件夹

问题信息

推送《Python网络爬虫实战》的代码到GitHub仓库Book_WebScrapingwithPython_SourceCode,因为源代码是文件夹,所以需要推送的是整个文件夹内容


解决办法

  • 首先在我的GitHub上新建一个仓库,取名Book_WebScrapingwithPython_SourceCode
  • 其次在源代码文件夹内打开Git Bash Here
  • 输入一下命令
git init    #初始化本地文件
git add .    #添加全部文件(git  add  -A)
git commit -m 'add all the file'    #提交修改
git status    #查看是否还有未提交
git remote  add  origin  你的仓库地址    #远程仓库关联到origin名称上
git push origin master    #将add内容推送到远程仓库   

你可能感兴趣的:(向GitHub仓库推送(push)本地文件夹)