Linux github提交方法
git clone https://github.com/ATM006/loadbalance.git
git status
git add .
git status
git commit -m “first”
git status
git push
git status
orchid@ATM:~/myprogram$
git clone https://github.com/ATM006/loadbalance.git
Cloning into ‘loadbalance’…
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity… done.
orchid@ATM:~/myprogram
cdloadbalance/orchid@ATM: /myprogram/loadbalance
ls
client loadblance README.md server
orchid@ATM:~/myprogram/loadbalance$ git status
On branch master
Your branch is up-to-date with ‘origin/master’.
Untracked files:
(use “git add …” to include in what will be committed)
client/
loadblance/
server/
nothing added to commit but untracked files present (use “git add” to track)
orchid@ATM:~/myprogram/loadbalance
gitadd.orchid@ATM: /myprogram/loadbalance
git status
On branch master
Your branch is up-to-date with ‘origin/master’.
Changes to be committed:
(use “git reset HEAD …” to unstage)
new file: client/a.out
new file: client/client.cpp
new file: client/client_a.cpp
new file: client/client_b.cpp
new file: client/myclient
new file: loadblance/Makefile
new file: loadblance/_main.cpp
new file: loadblance/a.out
new file: loadblance/conf.xml
new file: loadblance/conn.cpp
new file: loadblance/conn.o
new file: loadblance/edit
new file: loadblance/main.cpp
new file: loadblance/main.o
new file: loadblance/processpool.h
new file: loadblance/struct.h
new file: loadblance/test.cpp
new file: server/a.out
new file: server/s1
new file: server/s2
new file: server/s3
new file: server/server.cpp
new file: server/server2.cpp
new file: server/server_a.cpp
new file: server/server_b.cpp
new file: server/server_c.cpp
orchid@ATM:~/myprogram/loadbalance
gitcommit−m“first”[master749bddf]first26fileschanged,1646insertions(+)createmode100755client/a.outcreatemode100644client/client.cppcreatemode100644client/clienta.cppcreatemode100644client/clientb.cppcreatemode100755client/myclientcreatemode100644loadblance/Makefilecreatemode100644loadblance/main.cppcreatemode100755loadblance/a.outcreatemode100644loadblance/conf.xmlcreatemode100644loadblance/conn.cppcreatemode100644loadblance/conn.ocreatemode100755loadblance/editcreatemode100644loadblance/main.cppcreatemode100644loadblance/main.ocreatemode100755loadblance/processpool.hcreatemode100644loadblance/struct.hcreatemode100644loadblance/test.cppcreatemode100755server/a.outcreatemode100755server/s1createmode100755server/s2createmode100755server/s3createmode100644server/server.cppcreatemode100644server/server2.cppcreatemode100644server/servera.cppcreatemode100644server/serverb.cppcreatemode100644server/serverc.cpporchid@ATM: /myprogram/loadbalance
ls
client loadblance README.md server
orchid@ATM:~/myprogram/loadbalance
gitstatusOnbranchmasterYourbranchisaheadof‘origin/master′by1commit.(use“gitpush”topublishyourlocalcommits)nothingtocommit,workingdirectorycleanorchid@ATM: /myprogram/loadbalance
ls
client loadblance README.md server
orchid@ATM:~/myprogram/loadbalance$ git push
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)
Username for ‘https://github.com‘: ATM006
Password for ‘https://ATM006@github.com‘:
Counting objects: 30, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (30/30), 53.10 KiB | 0 bytes/s, done.
Total 30 (delta 11), reused 0 (delta 0)
remote: Resolving deltas: 100% (11/11), done.
To https://github.com/ATM006/loadbalance.git
11222ed..749bddf master -> master
orchid@ATM:~/myprogram/loadbalance
gitstatusOnbranchmasterYourbranchisup−to−datewith‘origin/master′.nothingtocommit,workingdirectorycleanorchid@ATM: /myprogram/loadbalance
Github使用方法总结
http://blog.chinaunix.net/uid-17188120-id-4650534.html
原文链接:
https://wenku.baidu.com/view/db64e92a0a4c2e3f5727a5e9856a561252d321c6