Git Push

  1. 建立一個測試檔案 test.txt。
    pyuser@ip123:~/python_pg$ echo 'git test' > test.txt
    
  2. git add 將 test.txt 送到暫存區。
    pyuser@ip123:~/python_pg$ git add test.txt
    
  3. git commit 將 test.txt 存入本地 repository。
    pyuser@ip123:~/python_pg$ git commit -m "test.txt"
    [master (root-commit) f99a587] test.txt
     1 file changed, 1 insertion(+)
     create mode 100644 test.txt
    
  4. git push 將本地 repository 存入遠端的 git repository。
    pyuser@ip123:~/python_pg$ git commit -m "test.txt"
    [master (root-commit) f99a587] test.txt
     1 file changed, 1 insertion(+)
     create mode 100644 test.txt
     pyuser@ip123:~/python_pg$ git push
    Enumerating objects: 3, done.
    Counting objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 211 bytes | 211.00 KiB/s, done.
    Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
    To http://deyu.wang/python_pg.git
     * [new branch]      master -> master