gitHub入門 Push 到github

陳重陽發表於2017-01-15

新建檔案,並提交到倉庫。

$ echo "Hello World." >> HelloWorld
$ git add HelloWorld 
$ git commit -m "Hello World."
[master 0b4a184] Hello World.
 1 file changed, 1 insertion(+)
 create mode 100644 HelloWorld

檢視倉庫狀態

$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
nothing to commit, working tree clean

push 到 github

$ git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 292 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/22377832/learngit.git
c8ebeec..0b4a184  master -> master

檢視github可以看到剛才的commit enter image description here

相關文章