一,軟體安裝環境:
Operating System: Windows 7 旗艦版 64-bit (6.1, Build 7601) Service Pack 1 (
7601.win7sp1_ldr.170913-0600)
Language: Chinese (Simplified) (Regional Setting: Chinese (Simplified))
System Manufacturer: Hewlett-Packard
System Model: HP 431 Notebook PC
BIOS: InsydeH2O Version 03.60.50F.22
Processor: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz (4 CPUs), ~2.2GHz
Memory: 4096MB RAM
二、軟體版本
1. Git-2.14.3-64-bit
三、軟體下載
1. Git-2.14.3-64-bit:
2. Git中文參考手冊CHM:
3.如不能下載請聯繫QQ :761593965
四、安裝過程:
1.安裝git.
2.註冊github賬戶,網址是. github.com,特別提醒一定要用Google Chrome瀏覽器,不然配置SSH Keys會找不到界面。
3. 配置Git, 首先在本地創建ssh key,打開gitbash,
輸入: ssh-keygen -t rsa -C “your_email@youremail.com”
這裡輸入你在github上註冊的郵箱。之後會要求確認路徑和輸入密碼,我們這使用默認的一路回車就行。成功的話會在git安裝目錄/下生成.ssh文件夾,進去,打開id_rsa.pub,複製裡面的key。
4.配置github上的SSH Keys,進入github,進入 Account Settings(賬戶配置),左邊選擇SSH Keys,Add SSH Key,title隨便填,粘貼在你電腦上生成的key。
5.驗證是否成功,在git bash下輸入:ssh -T git@github.com.
如果是第一次的會提示是否continue,輸入yes就會看到:You’ve successfully authenticated, but GitHub does not provide shell access 。這就表示已成功連上github。
6.在github上創建一個項目,進入github,在Repositories頁面右側有一個New按鈕,點擊它來創建新的項目代碼庫。
7.將github上創建的項目克隆到本地,打開gitbash,
切換到你本地的項目目錄,我的在d:git/
輸入:cd d:
輸入:cd git
輸入:git clone username@host:/path/to/repository
其中username@host:/path/to/repository是指的githubh 上項目地址,進入項目後,點擊cloneordonwload可以獲得。
8.將本地項目文件上傳到到github, 在git bash下輸入:
git add test.txt //添加test.txt
git commit -m 「push test.txt」 //提交描述
git push origin master //將代碼提交到遠程伺服器,這個就是描述
原創文章,作者:投稿專員,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/222927.html