git for github步骤

uname@uname-PC MINGW64 ~
//初始化
$ git init
Initialized empty Git repository in C:/Users/uname/.git/
//名字
uname@uname-PC MINGW64 ~ (master)
$ git config --global user.name '***'
//email
uname@uname-PC MINGW64 ~ (master)
$ git config --global user.email ******@qq.com

uname@uname-PC MINGW64 ~ (master)
$ cd d
bash: cd: d: No such file or directory

uname@uname-PC MINGW64 ~ (master)
$ cd d:
//创建文件
uname@uname-PC MINGW64 /d
$ mkdir test

uname@uname-PC MINGW64 /d
$ cd test:
bash: cd: test:: No such file or directory

uname@uname-PC MINGW64 /d
$ cd test
//显示文件
uname@uname-PC MINGW64 /d/test
$ git status
fatal: Not a git repository (or any of the parent directories): .git

uname@uname-PC MINGW64 /d/test
$ git status
fatal: Not a git repository (or any of the parent directories): .git
//添加文件到缓存(还不知道原理)
uname@uname-PC MINGW64 /d/test
$ git add
fatal: Not a git repository (or any of the parent directories): .git

uname@uname-PC MINGW64 /d/test
$ git clone https://github.com/ifmiss/test.git
Cloning into 'test'...
Fatal: AggregateException encountered.
Username for 'https://github.com': pro
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/ifmiss/test.git/'

uname@uname-PC MINGW64 /d/test
$ git clone https://github.com/ifmiss/test.git
Cloning into 'test'...
Fatal: AggregateException encountered.
Username for 'https://github.com': *********@qq.com
remote: Repository not found.
fatal: repository 'https://github.com/ifmiss/test.git/' not found
//从github上对应的项目clone 
uname@uname-PC MINGW64 /d/test
$ git clone https://github.com/*********/SpringMvc_easyui
Cloning into 'SpringMvc_easyui'...
warning: You appear to have cloned an empty repository.
Checking connectivity... done.

uname@uname-PC MINGW64 /d/test
$ git status
fatal: Not a git repository (or any of the parent directories): .git

uname@uname-PC MINGW64 /d/test
$ cd SpringMvc_easyui

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git status
On branch master

Initial commit

Untracked files:
  (use "git add ..." to include in what will be committed)

        SpringMvc_easyui.txt

nothing added to commit but untracked files present (use "git add" to track)

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git add .

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached ..." to unstage)

        new file:   SpringMvc_easyui.txt


uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git commit -am '测试test'
[master (root-commit) bd9e9db] 测试test
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 SpringMvc_easyui.txt

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git status
On branch master
Your branch is based on 'origin/master', but the upstream is gone.
  (use "git branch --unset-upstream" to fixup)
nothing to commit, working tree clean
//反正有用不知道干啥
uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git remote -v
origin  https://github.com/*********/SpringMvc_easyui (fetch)
origin  https://github.com/*********/SpringMvc_easyui (push)
//推送上去
uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git push origin master
Fatal: AggregateException encountered.
Username for 'https://github.com': *********@qq.com
Counting objects: 3, done.
Writing objects: 100% (3/3), 222 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/*********/SpringMvc_easyui
 * [new branch]      master -> master

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ 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)

        springui/

nothing added to commit but untracked files present (use "git add" to track)

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git add .

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD ..." to unstage)




uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git commit -am 'SpringMvc EasyUI'
[master ad63253] SpringMvc EasyUI
 439 files changed, 73403 insertions(+)

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ 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

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git remote -v
origin  https://github.com/*********/SpringMvc_easyui (fetch)
origin  https://github.com/*********/SpringMvc_easyui (push)

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git push origin master
Fatal: HttpRequestException encountered.
Username for 'https://github.com': *********@qq.com
Counting objects: 372, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (364/364), done.
Writing objects:   4% (15/372)

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git push origin master
Fatal: HttpRequestException encountered.
Username for 'https://github.com': *********@qq.com
Counting objects: 372, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (364/364), done.
Writing objects:   4% (15/372)
git config --global http.postBuffer 524288000
//解决上传静止不动问题
uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git config --global http.postBuffer 524288000

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git push origin master
Fatal: HttpRequestException encountered.
Username for 'https://github.com': *********@qq.com
Counting objects: 372, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (364/364), done.
Writing objects: 100% (372/372), 6.10 MiB | 0 bytes/s, done.
Total 372 (delta 165), reused 0 (delta 0)
To https://github.com/*********/SpringMvc_easyui
 * [new branch]      master -> master

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ To https://github.com/*********/SpringMvc_easyui
bash: To: command not found

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$  * [new branch]      master -> master
bash: SpringMvc_easyui.txt: command not found

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$

uname@uname-PC MINGW64 /d/test/SpringMvc_easyui (master)
$ git push origin master
Fatal: HttpRequestException encountered.
Username for 'https://github.com': *********@qq.com
Counting objects: 372, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (364/364), done.
Writing objects: 100% (372/372), 6.11 MiB | 0 bytes/s, done.
Total 372 (delta 164), reused 0 (delta 0)
To https://github.com/*********/SpringMvc_easyui
   bd9e9db..ad63253  master -> master


你可能感兴趣的:(GitHub)