天天看點

android 入門-git之上傳本地代碼到github

github部分:

1.首先去github網站 上注冊一個使用者

2.說明 https://guides.github.com/activities/hello-world/

2.點選

android 入門-git之上傳本地代碼到github

 New repository

3.

android 入門-git之上傳本地代碼到github

 這個時候會在github 産生一個開源檔案

4.

android 入門-git之上傳本地代碼到github

5.找到你的項目位址,打開git bash here 

android 入門-git之上傳本地代碼到github

6.

android 入門-git之上傳本地代碼到github

7.

android 入門-git之上傳本地代碼到github

8.

android 入門-git之上傳本地代碼到github

項目部分:

a:打開file->setting->搜尋:github add username password 然後在點選test。

b:打開vcs 找到enable vcs control 在右側填入 git

c:打開VCS create git repository 選擇你要上傳的項目 點選ok ,此時已将項目add 到git repository

d:然後點選上傳的項目右鍵 找到Git ,看到一個+ 号 将檔案commit 到本地git repository

e: 點選要上傳的項目 右鍵 find Git ,Commit Directory (看重要提示*)

f:點選要上傳的項目 右鍵 find Git,Repository,Push

a:

android 入門-git之上傳本地代碼到github
android 入門-git之上傳本地代碼到github

b:

android 入門-git之上傳本地代碼到github
android 入門-git之上傳本地代碼到github
android 入門-git之上傳本地代碼到github

此時項目所有的檔案變為暗紅色。

c:

android 入門-git之上傳本地代碼到github
android 入門-git之上傳本地代碼到github

d:

android 入門-git之上傳本地代碼到github
android 入門-git之上傳本地代碼到github

e:

android 入門-git之上傳本地代碼到github
android 入門-git之上傳本地代碼到github

這個時候要執行

android 入門-git之上傳本地代碼到github

 git pull --rebase origin master

android 入門-git之上傳本地代碼到github

f:

android 入門-git之上傳本地代碼到github
android 入門-git之上傳本地代碼到github

送出到github結束。

重要提示:選擇項目的時候。可以送出android 類别,也可以選擇project類别。他們有區分。注意看送出的commint directory