1.安裝配置
默認大家都已經安裝了Git軟件,參考下圖進行git與as關聯
-
配置git ,找到你的git安裝的bin目錄
-
設置GitHub用戶信息
-
填寫完用戶名,密碼後可以點擊Test,出現下圖怎麼配置成功
2.分享項目到GitHub
-
開啓GitHun插件
-
創建關聯的庫,點擊Share進行分享
-
點擊ok提交代碼
這樣我們就把本地項目已經與github關聯起來了,請看下圖。左邊的是用來更新github上面的項目的,右邊是用來提交我們本地項目的
3.注意事項
Can’t finish GitHub sharing process
Successfully created project ‘GitHubDemo’ on GitHub, but initial commit failed:
* Please tell me who you are. Run git config –global user.email “[email protected]” git config –global user.name “Your Name” to set your account’s default identity. Omit –global to set the identity only in this repository. fatal: empty ident name (for ) not allowed during executing git -c core.quotepath=false commit -m “Initial commit xxx” –
由於剛配置的環境,沒有配置會出現這樣的錯誤。大致意思是需要一個名稱才能提交到github上面,解決辦法如下圖,第一個是設置郵箱地址,第二個是設置用戶名