<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] ## 配置公鑰 ` `使用`ssh-keygen -t rsa -C xxxx`生成公鑰。其中xxxx表示gitee賬戶。 ![](https://img.kancloud.cn/68/42/68427714494e0c6ff9331377304317c1_632x482.png) ` `使用`cat ~/.ssh/id_rsa.pub`查看生成的公鑰。 ![](https://img.kancloud.cn/b3/05/b3050c385aa53234b6f9cac6e0e8e362_629x476.png) ` `打開Gitee進入個人設置,拷貝剛剛cat顯示的公鑰,填入。 ![](https://img.kancloud.cn/7a/56/7a562f3651e643f1ac78a2c2cad032c5_1215x671.png) ` `添加后可以看到自己添加的公鑰。 ![](https://img.kancloud.cn/2d/62/2d622c75b9afc19472cbd342ec0cec81_1082x271.png) ## 新建gitee項目 ` `和GitHub類似。 ![](https://img.kancloud.cn/b5/aa/b5aa86807e0fb2dac31bc9fd45dcc0c7_1138x629.png) ## 配置遠程庫關聯 ` `若本地項目之前沒有配置git,首先執行`git init`進行初始化。 ![](https://img.kancloud.cn/53/96/53963a2e9d93947fc2b5697cde81ed1c_631x482.png) ` `然后執行`$ git remote -v`查看本地關聯的遠程庫,如果沒有任何關聯,可以執行`$ git remote add gitee 倉庫地址`添加遠程庫。獲取倉庫地址和github一樣。 ![](https://img.kancloud.cn/f1/7c/f17c06ada9476e34d09aa678dce5ee3c_1054x477.png) ***** **注意:**如果存在說明當前目錄之前關聯過Git遠程庫,可以在一個新的目錄執行`$ git init`初始化一個新的本地倉庫,也可以執行`$ git remove rm "XXX"`刪除, 還可以再添加一個不重名的遠程庫。 提交的時候指定push,例:`$ git push gitee master`,這樣一來,我們的本地庫就可以同時與多個遠程庫互相同步: ![](https://img.kancloud.cn/39/92/3992fb1881336b04d8de2d6107442bab_439x265.png) ## 同步工程 ` `使用`git pull gitee master`將遠程工程同步到本地,然后本地工程進行修改,使用`git status`查看當前的代碼修改情況,使用`git add .`將變更的文件添加到本地git庫,然后使用`git commit -m "說明"`添加修改說明,接著使用`git push gitee master`將修改后的項目推送到遠程gintee上。 ## 新建工程后的同步操作流程 ```[flow] start=>start: 開始 op1=>operation: git init op2=>operation: git remote add gitee +倉庫地址 op3=>operation: git pull gitee master op4=>operation: git status op5=>operation: git add . op6=>operation: git commit -m "說明" op7=>operation: git push gitee master end=>end: 結束 start->op1(right)->op2(right)->op3(bottom)->op4(bottom)->op5(bottom)->op6(bottom)->op7(bottom)->end ``` ## 已有工程的同步操作 ```[flow] start=>start: 開始 op3=>operation: git pull gitee master op4=>operation: git status op5=>operation: git add . op6=>operation: git commit -m "說明" op7=>operation: git push gitee master end=>end: 結束 start->op3(right)->op4(right)->op5(bottom)->op6(bottom)->op7(bottom)->end ``` ## 關于Git commit ` ` git commit 主要是將暫存區里的改動給提交到本地的版本庫。每次使用git commit 命令我們都會在本地版本庫生成一個40位的哈希值,這個哈希值也叫commit-id。 `  `commit-id在版本回退的時候是非常有用的,它相當于一個快照,可以在未來的任何時候通過與git reset的組合命令回到這里. ## linux上傳至gitee的腳本 為了使得每次同步到云端倉庫更簡單,自己寫了一個腳本: ```bash #!/usr/bin/env bash #UFUNCTION=自動同步當前項目至gitee倉庫 pwd git status git add . if [ $# -gt 0 ];then git commit -m "$*" else dat=$(date +%Y/%m/%d\ %H:%M:%S) git commit -m "$dat" fi git push gitee master ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看