Git-往返github和本地

將GitHub倉庫Test弄到本地

  • 本地新建文件夾Test
  • 右擊運行gitbash
  • 在gitbash中輸入git init
  • 在github 倉庫選擇clone or download
  • 複製連接https://github.com/xxx/xxx.git
  • 在gitbash中輸入git clone https://github.com/xxx/xxx.git

將本地文件夾上傳到GitHub

  • github中新建倉庫NewRepo
  • 在本地文件夾Test中右擊選擇gitbash,輸入git init
  • git status(無關緊要)
  • git add *
    git status(無關緊要)
  • git commit -m 'description of this commit'
  • git status(無關緊要)
  • 從github倉庫NewRepo點擊clone or download,複製連接
  • git remote add origin https://github.com/xxx/xxx.git
  • git push -u origin master
相關文章
相關標籤/搜索