<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Git git是一種分布式版本控制系統,是目前項目管理使用較多的一種工具。 ### 下載安裝 ### windows [官網](http://www.git-scm.com/),下載安裝包,直接運行之后命令行就可以運行了。 ### Mac 如果是安裝了xcode的話,會自帶一個版本的git。 如果想要安裝新版本的git,推薦使用[**Homebrew**](http://brew.sh/): mac下的apt-get。 安裝brew,它下載的命令是存在放`/usr/local/bin`中的,所以要想正常工作,還需要在PATH中添加這個路徑,在命名行下輸入:`echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile`。 ### Linux Linux下可以使用`apt-get install git`來安裝。 ### 學習教程 - [最好的中文教程](http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000) - [Git Magic](http://www-cs-students.stanford.edu/~blynn/gitmagic/intl/zh_cn/): 網上較火的一套教程。 - [GotGithub](https://github.com/gotgit/gotgithub): 一本中文的介紹github使用的書。 - [Git Tutorials](https://www.atlassian.com/git?atl_source=cac-bitbucket-1&atl_medium=ace&atl_campaign=ACE-158-Stash-GIT-on-Bitbucket-CAC_git): bitbucket的教程。 - [Try Git](http://try.github.com/): codeschool教程。 - [Git Immersion](http://gitimmersion.com/index.html): 答題的形式學習git. - [Learn Version Control with Git](http://www.git-tower.com/learn/) - [githug](https://github.com/Gazler/githug): Git your game on! - [git-game](https://github.com/hgarc014/git-game): terminal game to test git skills. - [Learn Git Branching](http://pcottle.github.io/learnGitBranching/): 形象直觀的圖形化練習網站。 ### 使用技巧 ### 資料 - [GitHub秘籍](https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.zh-cn.md) - [Set up Git](https://confluence.atlassian.com/display/BITBUCKET/Set+up+Git): bitbucket教程。 - [Github Help](https://help.github.com/) - [使用git和github進行協同開發流程](http://livoras.com/post/28) ### 配置文件 一般都在`/user`下,window對應的目錄是`C:\Users\username`,mac和linux對于的就是用戶主目錄`/Users/username`。配置文件名稱為`.gitconfig`。 通常我們使用git的時候最先會去配置username和email: ~~~ git config --global user.name "FIRST_NAME LAST_NAME" git config --global user.email "MY_NAME@example.com" ~~~ 一般而言,我會使用`git add . -> git commit -m "xxxx" -> git push`的方式提交,第一次git操作的時候,git會給我如下的提示: ~~~ warning: push.default is unset; its implicit value has changed in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the traditional behavior, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple When push.default is set to 'matching', git will push local branches to the remote branches that already exist with the same name. Since Git 2.0, Git defaults to the more conservative 'simple' behavior, which only pushes the current branch to the corresponding remote branch that 'git pull' uses to update the current branch. See 'git help config' and search for 'push.default' for further information. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git) ~~~ 其實就是告訴我要設置下push.default,執行`git config --global push.default simple`即可。 ### 存儲密碼 #### https協議 如果使用的是https協議訪問git倉庫,與服務器端同步的時候每一次都會提示輸入密碼。解決這個問題的方式就是能讓密碼保存起來。 在windows下,我使用的是[git-credential-winstore](http://gitcredentialstore.codeplex.com/)。下載安裝即可使用。 在Mac下,我使用的是[git-credential-osxkeychain](http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain)。首先在終端中檢測是否已經有git-credential-osxkeychain,`git credential-osxkeychain`。提示`usage: git credential-osxkeychain <get|store|erase>`, 代表有。 如果沒有,下載這個工具,執行: ~~~ Move the file to the /usr/local/bin directory. $ sudo mv git-credential-osxkeychain /usr/local/bin/ Make the file an executable: $ chmod u+x /usr/local/bin/git-credential-osxkeychain Configure git to use the helper. $ git config --global credential.helper osxkeychain # Set git to use the osxkeychain credential helper ~~~ 如果存在的話,直接執行`git config --global credential.helper osxkeychain`。 在Linux下,執行`git config --global credential.helper store`。 操作完之后,檢查下`.gitconfig`文件,看是否添加了`[credential]`字段。 如果需要取消設置,執行`git config --unset --global credential.helper`。 #### ssh協議 需要設置ssh的私鑰和公鑰。 ### 切換協議 查看當前remote: `git remote -v`。 更新remote: `git remote set-url origin https://git.oschina.net/username/YourRepo`
                  <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>

                              哎呀哎呀视频在线观看