Git 基础

  1. 已有版本库

    git clone <url of remote> <directoryName>
    cd  <directoryName>
    // add & add file1
    git add file1
    git commit -m "commit message"
    git push origin master
    
  2. 新版本库

    mkdir <directoryName>
    cd <directoryName>
    git init
    // add & add file1
    git add file1
    git commit -m "commit message"
    git remote add <<url of remote, github etc.>
    git push origin master -u
    
  3. 分支

    git checkout master
    git checkout -b <branchName>
    // add & add file1
    git add file1
    git commit -m "commit message"
    git push origin <branchName>
    git checkout master
    git merge <branchName>
    // fix conflict
    git push origin master
    
  4. 分之管理与协作

    • fork & pull request
    • develop branch, feature branch
  5. 工具 & 平台

    • SourceTree
    • Github

results matching ""

    No results matching ""