Android深度探索HAL與驅動開發 第三章

來源:互聯網
上載者:User

標籤:

                       Android深度探索HAL與驅動開發

                                  第三章

                                Git使用入門

                                 讀書筆記

Git是對原始碼進行管理的軟體。

一、安裝Git

# apt-get install git

# apt-get install git-doc git-emall git-gui gitk

用以下命令控制Git:

# apt-get install git-core

# apt-get install git-doc git-svn git-email git-gui gitk

 

二、查看Git文檔

查看git-checkout命令文檔:

# git help git-checkout

查看HEML格式文檔:

# git help -w git-checkout

 

三、原始碼的提交與擷取

1、使用git clone命令在本地建立一個空的版本庫:

# mkdir -p/demo/helloworld-git

# cd /demo/helloworld-git

# git init

2、將檔案提交到本地版本庫:git commit

# cd /demo/helloworld-git

# echo “helloworld”>helloworld.txt

# git add helloworld.txt

# git commit -m ‘helloworld-master’

-m命令列參數是本次提交的備忘;

3、建立本地分支:git branch

# git branch                查看本地分支

# git branch new-branch      建立分支

# git branch -D new-branch    刪除剛建立的分支

4、切換本地分支:git checkout

# git checkout new-branch     將本地分支切換到new-branch上

修改helloworld.txt檔案內容並重新提交到本地版本庫

# echo ‘世界你好’>helloworld.txt

# git add helloworld.txt

# git commint -m helloworld-new-branch

5、在GitHub上建立開源項目

6、上傳原始碼到GitHub:git push

上傳前先備份

# ssh-keygen -t rsa -C “[email protected]”

上傳檔案前需要使用git config命令設定上傳這的名字和email。

# git cinfig --global user.name “Your Name”

# git config --global user.email [email protected]

使用git remove命令設定helloworld工程在GitHub上的URI。

# git remove add orign [email protected]:androidguy/helloworld.git

7、從GitHub下載原始碼:git clone

使用下命令下載整個工程

# git clone [email protected]:androidguy/helloworld.git

 

四、小結

五、學習Git的用法。

 

 

 

http://www.cnblogs.com/qwhw/

 

Android深度探索HAL與驅動開發 第三章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.