上傳已有專案至 GitHub
序言
gitHub是一個面向開源及私有軟體專案的託管平臺,因為只支援git 作為唯一的版本庫格式進行託管,故名gitHub。
gitHub於2008年4月10日正式上線,除了git程式碼倉庫託管及基本的 Web管理介面以外,還提供了訂閱、討論組、文字渲染、線上檔案編輯器、協作圖譜(報表)、程式碼片段分享(Gist)等功能。目前,其註冊使用者已經超過350萬,託管版本數量也是非常之多,其中不乏知名開源專案 Ruby on Rails、jQuery、python 等。
如何上傳已有專案工程檔案至 GitHub對應倉庫
在 GitHub 中建立倉庫
1. 在個人中心中選擇New repository

New repository.png
2.設定倉庫名字,描述,然後點選建立

set repository.png

repository information.png
上傳本地已有工程至指定倉庫
1.使用終端 cd 到本地工程檔案目錄下

cd.png
2.通過命令列新增本地工程檔案並上傳

git.png
3.回到自己GitHub倉庫列表中檢視

repositories.png

success.png
發現已經成功將自己本地工程專案檔案上傳至 GitHub 指定倉庫中
從 GitHub 中下載檔案至本地
先上傳本地公鑰至 GitHub 中
首先在本地建立ssh key;
$ ssh-keygen -t rsa -C "your_email@youremail.com"
後面的your_email@youremail.com改為你在github上註冊的郵箱,之後會要求確認路徑和輸入密碼,我們這使用預設的一路回車就行。成功的話會在~/下生成.ssh資料夾,進去,開啟id_rsa.pub,複製裡面的key。

image.png

image.png

image.png

image.png
上傳 ssh key 至 GitHub
在個人中心點選 setting, 然後選擇SSH and GPG keys, 然後選擇 add new 即可

image.png
為了驗證是否成功,在git bash下輸入:
$ ssh -T git@github.com
如果是第一次的會提示是否continue,輸入yes就會看到:You've successfully authenticated, but GitHub does not provide shell access 。這就表示已成功連上github。
從 GitHub 中下載指定倉庫至本地
先 copy 地址

copy.png
cd 到指定資料夾目錄,然後使用 git clone 命令即可

image.png
使用 GitHub 提供的GitHub Desktop上傳本地工程檔案至遠端倉庫
1.先新增本地工程檔案至倉庫中

image.png
2.填寫提交日誌

image.png
3.push 至遠端倉庫

image.png
4.GitHub Desktop 檢視倉庫

image.png
-
GitHub 中檢視倉庫
image.png
相關文章
- 如何將本地專案上傳至GitHubGithub
- 上傳檔案至GitHubGithub
- [Git命令]上傳單個檔案到GitHub專案已有資料夾Github
- 如何將Ubuntu伺服器上的專案上傳至GitHubUbuntu伺服器Github
- 將本地專案上傳至GitHub上的簡要操作說明Github
- 上傳專案到gitHub,上傳報錯和刪除gitHub上的專案Github
- git上傳至githubGithub
- 上傳專案到githubGithub
- 【Git/Github】向已有倉庫上傳檔案/資料夾Github
- git上傳專案到githubGithub
- 初次在cmd使用git命令上傳專案至github方法(新手向)Github
- vue專案上傳Github預覽VueGithub
- 教你如何上傳專案到GitHubGithub
- 如何在github上傳本地專案Github
- 建立本地專案並上傳GitHubGithub
- gitHub_2 上傳專案程式碼Github
- 使用git將本地專案上傳到githubGithub
- 通過git shell 在Github上傳本地專案Github
- 把本地專案上傳到github 不使用eclipseGithubEclipse
- 如何在github上傳本地專案程式碼(新手使用)Github
- 使用Git工具,實現上傳本地專案到GitHubGithub
- Windows 環境中使用 Git 上傳專案到 GitHubWindowsGithub
- 如何用git將專案程式碼上傳到githubGithub
- 如何在github同一個倉庫上傳多個專案Github
- GitHub 上優質專案整理Github
- Python 搭配 Automator 上傳檔案到 GithubPythonGithub
- 將本地的專案提交github上Github
- github上一個好玩的專案Github
- hyperf 上傳檔案至華為雲 obs
- 上傳檔案專題
- git和tormoisegit上傳本地檔案到githubORMGithub
- Apache 基金會將其所有專案雙主映象至 GitHubApacheGithub
- 在github上優雅管理star專案Github
- GitHub 上週 JavaScript 趨勢榜專案GithubJavaScript
- 本週Github上7個有趣專案Github
- 下載Github上公開專案檔案方法#coding.net及git的使用方式#克隆 Github 上的專案Github
- 本地專案上傳到 CODING
- github上傳程式碼Github