• Git 学习笔记


    rm -rf 文件夹 若文件夹中有内容,应该这个样子
    rm dir 若文件夹中是空的
    git init 初始化,必须在 git add 之前添加

    cat ~/.gitconfig 可以查看git 中 gitconfig 中的配置

    git commit -m "要写的东西";

    安装 tig 工具 sudo apt-get install tig

    git commit -a -m "要写的东西" 这个样子就不用 git add 了

    git diff 不同之处

    git commit -a 可以打开 Nano 编辑器

    git commit -a -v

    git push -u origin master 推到远端

    git pull 拉到本地

    ssh-keyen

    提交项目的顺序:
    git commit 添加注释,必须的,不然不能提交
    git add
    git push

    Ubuntu 下安装GitHub
    命令: sudo apt-get install git

    将github中的项目复制到本地
    首先,建立一个目录 mkdir test
    然后,切换到当前目录 cd test/
    然后,git到本地 git clone https://github.com/Lovezbs66/Test.git (这个是,复制那个https)

    git第一次提交的时候,要配置用户名和邮箱,tell me who you are
    root@ubuntu:/home/lovezbs/git/Test# git config --global user.email "429377083@qq.com"
    root@ubuntu:/home/lovezbs/git/Test# git config --global user.name "zhangbingshuai"

    root@ubuntu:/home/lovezbs/git/Test# git config --global push.default matching
    root@ubuntu:/home/lovezbs/git/Test# git config --global pust.default simple


    查看 git config 的帮助信息
    root@ubuntu:/home/lovezbs/git/Test# git config
    usage: git config [options]

    Config file location
    --global use global config file
    --system use system config file
    --local use repository config file
    -f, --file <file> use given config file
    --blob <blob-id> read config from given blob object

    Action
    --get get value: name [value-regex]
    --get-all get all values: key [value-regex]
    --get-regexp get values for regexp: name-regex [value-regex]
    --get-urlmatch get value specific for the URL: section[.var] URL
    --replace-all replace all matching variables: name value [value_regex]
    --add add a new variable: name value
    --unset remove a variable: name [value-regex]
    --unset-all remove all matches: name [value-regex]
    --rename-section rename section: old-name new-name
    --remove-section remove a section: name
    -l, --list list all
    -e, --edit open an editor
    --get-color <slot> find the color configured: [default]
    --get-colorbool <slot>
    find the color setting: [stdout-is-tty]

    Type
    --bool value is "true" or "false"
    --int value is decimal number
    --bool-or-int value is --bool or --int
    --path value is a path (file or directory name)

    Other
    -z, --null terminate values with NUL byte
    --includes respect include directives on lookup


    上传文件的顺序

    git add 文件名
    git status 查看状况

    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:48 <jslfjlsfj>
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Music
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 21:56 one
    -rw-rw-r-- 1 lovezbs lovezbs 26064 Mar 30 01:51 phpinfo.txt
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Pictures
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Public
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Templates
    drwxrwxr-x 3 lovezbs lovezbs 4096 Apr 24 21:06 test
    -rw-rw-r-- 1 lovezbs lovezbs 21 Mar 30 01:49 test.php
    -rw-rw-r-- 1 lovezbs lovezbs 8105 Apr 22 07:11 test.txt
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 21:55 two
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:52 <?var_dump(_FILE_) ?>
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Videos
    -rw-rw-r-- 1 lovezbs lovezbs 118 Apr 22 07:12 xixi.txt
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 18:37 zbs
    -rw-rw-r-- 1 lovezbs lovezbs 81 Apr 8 04:28 >zbs.php
    root@ubuntu:/home/lovezbs# rmdir git_test
    rmdir: failed to remove ?.it_test?. Directory not empty
    root@ubuntu:/home/lovezbs# rm git_test
    rm: cannot remove ?.it_test?. Is a directory
    root@ubuntu:/home/lovezbs# rm -rf git_test
    root@ubuntu:/home/lovezbs# ls -l
    total 116
    -rw-rw-r-- 1 lovezbs lovezbs 15202 Apr 22 07:08 c:history.txt
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Desktop
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Documents
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 27 03:23 Downloads
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:52 file.php
    -rw-r--r-- 1 root root 1769 Apr 24 20:58 git.txt
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:48 <jslfjlsfj>
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Music
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 21:56 one
    -rw-rw-r-- 1 lovezbs lovezbs 26064 Mar 30 01:51 phpinfo.txt
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Pictures
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Public
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Templates
    drwxrwxr-x 3 lovezbs lovezbs 4096 Apr 24 21:06 test
    -rw-rw-r-- 1 lovezbs lovezbs 21 Mar 30 01:49 test.php
    -rw-rw-r-- 1 lovezbs lovezbs 8105 Apr 22 07:11 test.txt
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 21:55 two
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:52 <?var_dump(_FILE_) ?>
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Videos
    -rw-rw-r-- 1 lovezbs lovezbs 118 Apr 22 07:12 xixi.txt
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 18:37 zbs
    -rw-rw-r-- 1 lovezbs lovezbs 81 Apr 8 04:28 >zbs.php
    root@ubuntu:/home/lovezbs# rmdir -rf test
    rmdir: invalid option -- 'r'
    Try 'rmdir --help' for more information.
    root@ubuntu:/home/lovezbs# rm -rf test
    root@ubuntu:/home/lovezbs# ls -l
    total 112
    -rw-rw-r-- 1 lovezbs lovezbs 15202 Apr 22 07:08 c:history.txt
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Desktop
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Documents
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 27 03:23 Downloads
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:52 file.php
    -rw-r--r-- 1 root root 1769 Apr 24 20:58 git.txt
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:48 <jslfjlsfj>
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Music
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 21:56 one
    -rw-rw-r-- 1 lovezbs lovezbs 26064 Mar 30 01:51 phpinfo.txt
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Pictures
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Public
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Templates
    -rw-rw-r-- 1 lovezbs lovezbs 21 Mar 30 01:49 test.php
    -rw-rw-r-- 1 lovezbs lovezbs 8105 Apr 22 07:11 test.txt
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 21:55 two
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:52 <?var_dump(_FILE_) ?>
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Videos
    -rw-rw-r-- 1 lovezbs lovezbs 118 Apr 22 07:12 xixi.txt
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 18:37 zbs
    -rw-rw-r-- 1 lovezbs lovezbs 81 Apr 8 04:28 >zbs.php
    root@ubuntu:/home/lovezbs# mkdir git
    root@ubuntu:/home/lovezbs# cd git/
    root@ubuntu:/home/lovezbs/git# git clone Linux 删除文件夹和文件的命
    蛳碌莨椋.还苡卸嗌偌赌柯迹.徊⑸境
    -f 就是直接强行删除,不作任何提示的意思fatal: repository 'Linux' does not exist
    root@ubuntu:/home/lovezbs/git# ? 浏览:18860 |更新:2013-05-02 18:40 |标签: 文件夹
    Sorry, command-not-found has crashed! Please file a bug report at:
    https://bugs.launchpad.net/command-not-found/+filebug
    Please include the following information with the report:

    command-not-found version: 0.3
    Python version: 3.4.0 final 0
    Sorry, command-not-found has crashed! Please file a bug report at:
    https://bugs.launchpad.net/command-not-found/+filebug
    Please include the following information with the report:

    command-not-found version: 0.3
    Python version: 3.4.0 final 0
    Sorry, command-not-found has crashed! Please file a bug report at:
    https://bugs.launchpad.net/command-not-found/+filebug
    Please include the following information with the report:

    command-not-found version: 0.3
    Python version: 3.4.0 final 0
    Sorry, command-not-found has crashed! Please file a bug report at:
    https://bugs.launchpad.net/command-not-found/+filebug
    Please include the following information with the report:

    command-not-found version: 0.3
    Python version: 3.4.0 final 0
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04 LTS
    Release: 14.04
    Codename: trusty
    Exception information:

    'utf-8' codec can't encode character 'udcb8' in position 0: surrogates not allowed
    Traceback (most recent call last):
    Distributor ID: Ubuntu
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
    File "/usr/lib/command-not-found", line 90, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04 LTS
    Release: 14.04
    Description: Ubuntu 14.04 LTS
    Release: 14.04
    Codename: trusty
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 265, in advise
    packages = self.getPackages(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 157, in getPackages
    result.update([(pkg, db.component) for pkg in db.lookup(command)])
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 85, in lookup
    result = self.db.lookup(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 41, in lookup
    key = key.encode('utf-8')
    UnicodeEncodeError: 'utf-8' codec can't encode character 'udcb8' in position 0: surrogates not allowed
    Codename: trusty
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04 LTS
    Release: 14.04
    Codename: trusty
    Exception information:

    'utf-8' codec can't encode character 'udcee' in position 0: surrogates not allowed
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
    File "/usr/lib/command-not-found", line 90, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 265, in advise
    packages = self.getPackages(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 157, in getPackages
    result.update([(pkg, db.component) for pkg in db.lookup(command)])
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 85, in lookup
    result = self.db.lookup(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 41, in lookup
    key = key.encode('utf-8')
    UnicodeEncodeError: 'utf-8' codec can't encode character 'udcee' in position 0: surrogates not allowed
    Exception information:

    'utf-8' codec can't encode character 'udce4' in position 0: surrogates not allowed
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
    File "/usr/lib/command-not-found", line 90, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 265, in advise
    packages = self.getPackages(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 157, in getPackages
    result.update([(pkg, db.component) for pkg in db.lookup(command)])
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 85, in lookup
    result = self.db.lookup(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 41, in lookup
    key = key.encode('utf-8')
    Exception information:

    'utf-8' codec can't encode character 'udcb1' in position 0: surrogates not allowed
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
    File "/usr/lib/command-not-found", line 90, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 265, in advise
    packages = self.getPackages(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 157, in getPackages
    result.update([(pkg, db.component) for pkg in db.lookup(command)])
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 85, in lookup
    result = self.db.lookup(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 41, in lookup
    key = key.encode('utf-8')
    UnicodeEncodeError: 'utf-8' codec can't encode character 'udcb1' in position 0: surrogates not allowed
    UnicodeEncodeError: 'utf-8' codec can't encode character 'udce4' in position 0: surrogates not allowed
    root@ubuntu:/home/lovezbs/git# linux删除目录很简单,很多人还是习惯用rmdir,不过一旦目录非空,就陷入深深的苦恼之中,现在使用rm -rf命令即可。
    Sorry, command-not-found has crashed! Please file a bug report at:
    https://bugs.launchpad.net/command-not-found/+filebug
    Please include the following information with the report:

    command-not-found version: 0.3
    Python version: 3.4.0 final 0
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04 LTS
    Release: 14.04
    Codename: trusty
    Exception information:

    'utf-8' codec can't encode character 'udcb3' in position 6: surrogates not allowed
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
    File "/usr/lib/command-not-found", line 90, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 265, in advise
    packages = self.getPackages(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 157, in getPackages
    result.update([(pkg, db.component) for pkg in db.lookup(command)])
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 85, in lookup
    result = self.db.lookup(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 41, in lookup
    key = key.encode('utf-8')
    UnicodeEncodeError: 'utf-8' codec can't encode character 'udcb3' in position 6: surrogates not allowed
    root@ubuntu:/home/lovezbs/git# 直接rm就可以了,不过要加两个参数-rf 即:rm -rf 目录名
    Sorry, command-not-found has crashed! Please file a bug report at:
    https://bugs.launchpad.net/command-not-found/+filebug
    Please include the following information with the report:

    command-not-found version: 0.3
    Python version: 3.4.0 final 0
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04 LTS
    Release: 14.04
    Codename: trusty
    Exception information:

    'utf-8' codec can't encode character 'udcbd' in position 1: surrogates not allowed
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
    File "/usr/lib/command-not-found", line 90, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 265, in advise
    packages = self.getPackages(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 157, in getPackages
    result.update([(pkg, db.component) for pkg in db.lookup(command)])
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 85, in lookup
    result = self.db.lookup(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 41, in lookup
    key = key.encode('utf-8')
    UnicodeEncodeError: 'utf-8' codec can't encode character 'udcbd' in position 1: surrogates not allowed
    root@ubuntu:/home/lovezbs/git# ?r 就是向下递归,不管有多少级目录,一并删
    Sorry, command-not-found has crashed! Please file a bug report at:
    https://bugs.launchpad.net/command-not-found/+filebug
    Please include the following information with the report:

    command-not-found version: 0.3
    Python version: 3.4.0 final 0
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04 LTS
    Release: 14.04
    Codename: trusty
    Exception information:

    'utf-8' codec can't encode character 'udcd6' in position 0: surrogates not allowed
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
    File "/usr/lib/command-not-found", line 90, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 265, in advise
    packages = self.getPackages(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 157, in getPackages
    result.update([(pkg, db.component) for pkg in db.lookup(command)])
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 85, in lookup
    result = self.db.lookup(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 41, in lookup
    key = key.encode('utf-8')
    UnicodeEncodeError: 'utf-8' codec can't encode character 'udcd6' in position 0: surrogates not allowed
    root@ubuntu:/home/lovezbs/git# .f 就是直接强行删除,不作任何提.的意思
    Sorry, command-not-found has crashed! Please file a bug report at:
    https://bugs.launchpad.net/command-not-found/+filebug
    Please include the following information with the report:

    command-not-found version: 0.3
    Python version: 3.4.0 final 0
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04 LTS
    Release: 14.04
    Codename: trusty
    Exception information:

    'utf-8' codec can't encode character 'udcfd' in position 0: surrogates not allowed
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
    File "/usr/lib/command-not-found", line 90, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 265, in advise
    packages = self.getPackages(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 157, in getPackages
    result.update([(pkg, db.component) for pkg in db.lookup(command)])
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 85, in lookup
    result = self.db.lookup(command)
    File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 41, in lookup
    key = key.encode('utf-8')
    UnicodeEncodeError: 'utf-8' codec can't encode character 'udcfd' in position 0: surrogates not allowed
    root@ubuntu:/home/lovezbs/git# ls -l
    total 0
    root@ubuntu:/home/lovezbs/git# git clone https://github.com/Lovezbs66/Test.git
    Cloning into 'Test'...
    warning: You appear to have cloned an empty repository.
    Checking connectivity... done.
    root@ubuntu:/home/lovezbs/git# ls -l
    total 4
    drwxr-xr-x 3 root root 4096 Apr 24 21:21 Test
    root@ubuntu:/home/lovezbs/git# cd Test/
    root@ubuntu:/home/lovezbs/git/Test# ls -l
    total 0
    root@ubuntu:/home/lovezbs/git/Test# touch read.txt
    root@ubuntu:/home/lovezbs/git/Test# vi read.txt
    root@ubuntu:/home/lovezbs/git/Test# cat read.txt
    Hello ,These words are writen on linux desktop on selef descination
    root@ubuntu:/home/lovezbs/git/Test# git status;
    On branch master

    Initial commit

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

    read.txt

    nothing added to commit but untracked files present (use "git add" to track)
    root@ubuntu:/home/lovezbs/git/Test# git add
    Nothing specified, nothing added.
    Maybe you wanted to say 'git add .'?
    root@ubuntu:/home/lovezbs/git/Test# git add read.txt
    root@ubuntu:/home/lovezbs/git/Test# git status
    On branch master

    Initial commit

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

    new file: read.txt

    root@ubuntu:/home/lovezbs/git/Test# git commit

    *** Please tell me who you are.

    Run

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

    to set your account's default identity.
    Omit --global to set the identity only in this repository.

    fatal: unable to auto-detect email address (got 'root@ubuntu.(none)')
    root@ubuntu:/home/lovezbs/git/Test# git commit

    *** Please tell me who you are.

    Run

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

    to set your account's default identity.
    Omit --global to set the identity only in this repository.

    fatal: unable to auto-detect email address (got 'root@ubuntu.(none)')
    root@ubuntu:/home/lovezbs/git/Test# git config --global "lovezbs@192.168.78.189"
    error: invalid key: lovezbs@192.168.78.189
    root@ubuntu:/home/lovezbs/git/Test# git commit

    *** Please tell me who you are.

    Run

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

    to set your account's default identity.
    Omit --global to set the identity only in this repository.

    fatal: unable to auto-detect email address (got 'root@ubuntu.(none)')
    root@ubuntu:/home/lovezbs/git/Test# ^C
    root@ubuntu:/home/lovezbs/git/Test# git-config zbs@qq.com
    No command 'git-config' found, did you mean:
    Command 'gst-config' from package 'libgst-dev' (universe)
    git-config: command not found
    root@ubuntu:/home/lovezbs/git/Test# git commit -am 'xxx'

    *** Please tell me who you are.

    Run

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

    to set your account's default identity.
    Omit --global to set the identity only in this repository.

    fatal: unable to auto-detect email address (got 'root@ubuntu.(none)')
    root@ubuntu:/home/lovezbs/git/Test# git config
    usage: git config [options]

    Config file location
    --global use global config file
    --system use system config file
    --local use repository config file
    -f, --file <file> use given config file
    --blob <blob-id> read config from given blob object

    Action
    --get get value: name [value-regex]
    --get-all get all values: key [value-regex]
    --get-regexp get values for regexp: name-regex [value-regex]
    --get-urlmatch get value specific for the URL: section[.var] URL
    --replace-all replace all matching variables: name value [value_regex]
    --add add a new variable: name value
    --unset remove a variable: name [value-regex]
    --unset-all remove all matches: name [value-regex]
    --rename-section rename section: old-name new-name
    --remove-section remove a section: name
    -l, --list list all
    -e, --edit open an editor
    --get-color <slot> find the color configured: [default]
    --get-colorbool <slot>
    find the color setting: [stdout-is-tty]

    Type
    --bool value is "true" or "false"
    --int value is decimal number
    --bool-or-int value is --bool or --int
    --path value is a path (file or directory name)

    Other
    -z, --null terminate values with NUL byte
    --includes respect include directives on lookup

    root@ubuntu:/home/lovezbs/git/Test# git config --global
    usage: git config [options]

    Config file location
    --global use global config file
    --system use system config file
    --local use repository config file
    -f, --file <file> use given config file
    --blob <blob-id> read config from given blob object

    Action
    --get get value: name [value-regex]
    --get-all get all values: key [value-regex]
    --get-regexp get values for regexp: name-regex [value-regex]
    --get-urlmatch get value specific for the URL: section[.var] URL
    --replace-all replace all matching variables: name value [value_regex]
    --add add a new variable: name value
    --unset remove a variable: name [value-regex]
    --unset-all remove all matches: name [value-regex]
    --rename-section rename section: old-name new-name
    --remove-section remove a section: name
    -l, --list list all
    -e, --edit open an editor
    --get-color <slot> find the color configured: [default]
    --get-colorbool <slot>
    find the color setting: [stdout-is-tty]

    Type
    --bool value is "true" or "false"
    --int value is decimal number
    --bool-or-int value is --bool or --int
    --path value is a path (file or directory name)

    Other
    -z, --null terminate values with NUL byte
    --includes respect include directives on lookup

    root@ubuntu:/home/lovezbs/git/Test# git commit

    *** Please tell me who you are.

    Run

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

    to set your account's default identity.
    Omit --global to set the identity only in this repository.

    fatal: unable to auto-detect email address (got 'root@ubuntu.(none)')
    root@ubuntu:/home/lovezbs/git/Test# git config --global user.email "429377083@qq.com"
    root@ubuntu:/home/lovezbs/git/Test# git config --global user.name "zhangbingshuai"
    root@ubuntu:/home/lovezbs/git/Test# git commit
    [master (root-commit) 827439f] Hello world , this is the second time that i write on git hub^x;:Gg^x
    1 file changed, 1 insertion(+)
    create mode 100644 read.txt
    root@ubuntu:/home/lovezbs/git/Test# ls -l
    total 4
    -rw-r--r-- 1 root root 68 Apr 24 21:22 read.txt
    root@ubuntu:/home/lovezbs/git/Test# cat read.txt
    Hello ,These words are writen on linux desktop on selef descination
    root@ubuntu:/home/lovezbs/git/Test# 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 directory clean
    root@ubuntu:/home/lovezbs/git/Test# 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 directory clean
    root@ubuntu:/home/lovezbs/git/Test# git push
    warning: push.default is unset; its implicit value is changing in
    Git 2.0 from 'matching' to 'simple'. To squelch this message
    and maintain the current behavior after the default changes, 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.

    In Git 2.0, Git will default 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': zb^H^H^H^H^H^[[3~^[[3~
    Password for 'https@github.com':

    remote: Invalid username or password.
    fatal: Authentication failed for 'https://github.com/Lovezbs66/Test.git/'
    root@ubuntu:/home/lovezbs/git/Test#
    root@ubuntu:/home/lovezbs/git/Test# git push
    warning: push.default is unset; its implicit value is changing in
    Git 2.0 from 'matching' to 'simple'. To squelch this message
    and maintain the current behavior after the default changes, 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.

    In Git 2.0, Git will default 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': zhangbingshuai
    Password for 'https://zhangbingshuai@github.com':
    remote: Invalid username or password.
    fatal: Authentication failed for 'https://github.com/Lovezbs66/Test.git/'
    root@ubuntu:/home/lovezbs/git/Test# git config --global push.default matching
    root@ubuntu:/home/lovezbs/git/Test# git config --global pust.default simple
    root@ubuntu:/home/lovezbs/git/Test# git push
    Username for 'https://github.com': lovezbs66
    Password for 'https://lovezbs66@github.com':
    No refs in common and none specified; doing nothing.
    Perhaps you should specify a branch such as 'master'.
    Everything up-to-date
    root@ubuntu:/home/lovezbs/git/Test# git push origin master
    Username for 'https://github.com': lovezbs66
    Password for 'https://lovezbs66@github.com':
    Counting objects: 3, done.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 315 bytes | 0 bytes/s, done.
    Total 3 (delta 0), reused 0 (delta 0)
    To https://github.com/Lovezbs66/Test.git
    * [new branch] master -> master
    root@ubuntu:/home/lovezbs/git/Test# git status
    On branch master
    Your branch is up-to-date with 'origin/master'.

    nothing to commit, working directory clean
    root@ubuntu:/home/lovezbs/git/Test# git config
    usage: git config [options]

    Config file location
    --global use global config file
    --system use system config file
    --local use repository config file
    -f, --file <file> use given config file
    --blob <blob-id> read config from given blob object

    Action
    --get get value: name [value-regex]
    --get-all get all values: key [value-regex]
    --get-regexp get values for regexp: name-regex [value-regex]
    --get-urlmatch get value specific for the URL: section[.var] URL
    --replace-all replace all matching variables: name value [value_regex]
    --add add a new variable: name value
    --unset remove a variable: name [value-regex]
    --unset-all remove all matches: name [value-regex]
    --rename-section rename section: old-name new-name
    --remove-section remove a section: name
    -l, --list list all
    -e, --edit open an editor
    --get-color <slot> find the color configured: [default]
    --get-colorbool <slot>
    find the color setting: [stdout-is-tty]

    Type
    --bool value is "true" or "false"
    --int value is decimal number
    --bool-or-int value is --bool or --int
    --path value is a path (file or directory name)

    Other
    -z, --null terminate values with NUL byte
    --includes respect include directives on lookup

    root@ubuntu:/home/lovezbs/git/Test#
    root@ubuntu:/home/lovezbs/git/Test# cd /etc/gitconfig
    bash: cd: /etc/gitconfig: No such file or directory
    root@ubuntu:/home/lovezbs/git/Test# cd /etc/
    root@ubuntu:/etc# ls -l
    total 1144
    drwxr-xr-x 3 root root 4096 Apr 17 2014 acpi
    -rw-r--r-- 1 root root 2981 Apr 17 2014 adduser.conf
    drwxr-xr-x 2 root root 4096 Mar 28 08:48 alternatives
    -rw-r--r-- 1 root root 401 Feb 19 2014 anacrontab
    drwxr-xr-x 8 root root 4096 Mar 27 05:36 apache2
    -rw-r--r-- 1 root root 112 Jan 10 2014 apg.conf
    drwxr-xr-x 6 root root 4096 Apr 17 2014 apm
    drwxr-xr-x 3 root root 4096 Apr 17 2014 apparmor
    drwxr-xr-x 8 root root 4096 Mar 27 04:14 apparmor.d
    drwxr-xr-x 5 root root 4096 Apr 17 2014 apport
    drwxr-xr-x 6 root root 4096 Mar 26 23:14 apt
    drwxr-xr-x 3 root root 4096 Apr 17 2014 aptdaemon
    drwxr-xr-x 2 root root 4096 Apr 17 2014 at-spi2
    drwxr-xr-x 3 root root 4096 Apr 17 2014 avahi
    -rw-r--r-- 1 root root 2177 Apr 8 2014 bash.bashrc
    -rw-r--r-- 1 root root 45 Mar 22 2014 bash_completion
    drwxr-xr-x 2 root root 4096 Apr 24 20:57 bash_completion.d
    -rw-r--r-- 1 root root 356 Jan 1 2012 bindresvport.blacklist
    -rw-r--r-- 1 root root 321 Apr 16 2014 blkid.conf
    lrwxrwxrwx 1 root root 15 Mar 26 22:17 blkid.tab -> /dev/.blkid.tab
    drwxr-xr-x 2 root root 4096 Apr 17 2014 bluetooth
    -rw-r--r-- 1 root root 33 Apr 17 2014 brlapi.key
    drwxr-xr-x 2 root root 12288 Apr 17 2014 brltty
    -rw-r--r-- 1 root root 22478 Mar 31 2014 brltty.conf
    drwxr-xr-x 3 root root 4096 Apr 17 2014 ca-certificates
    -rw-r--r-- 1 root root 7464 Apr 17 2014 ca-certificates.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 calendar
    drwxr-s--- 2 root dip 4096 Apr 17 2014 chatscripts
    drwxr-xr-x 4 root root 4096 Mar 26 23:11 chromium-browser
    -rw-r--r-- 1 root root 1332 Jan 16 2014 colord.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 compizconfig
    drwxr-xr-x 2 root root 4096 Apr 17 2014 console-setup
    drwxr-xr-x 2 root root 4096 Apr 17 2014 cracklib
    drwxr-xr-x 2 root root 4096 Mar 27 04:10 cron.d
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 cron.daily
    drwxr-xr-x 2 root root 4096 Apr 17 2014 cron.hourly
    drwxr-xr-x 2 root root 4096 Apr 17 2014 cron.monthly
    -rw-r--r-- 1 root root 722 Feb 8 2013 crontab
    drwxr-xr-x 2 root root 4096 Apr 17 2014 cron.weekly
    drwxr-xr-x 5 root lp 4096 Apr 24 20:23 cups
    drwxr-xr-x 2 root root 4096 Apr 17 2014 cupshelpers
    drwxr-xr-x 4 root root 4096 Apr 17 2014 dbus-1
    drwxr-xr-x 4 root root 4096 Apr 17 2014 dconf
    -rw-r--r-- 1 root root 2969 Feb 23 2014 debconf.conf
    -rw-r--r-- 1 root root 11 Feb 19 2014 debian_version
    drwxr-xr-x 2 root root 4096 Apr 22 06:02 default
    -rw-r--r-- 1 root root 604 Nov 7 2013 deluser.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 depmod.d
    drwxr-xr-x 4 root root 4096 Apr 17 2014 dhcp
    drwxr-xr-x 2 root root 4096 Mar 26 23:11 dictionaries-common
    drwxr-xr-x 2 root root 4096 Apr 17 2014 dnsmasq.d
    drwxr-xr-x 3 root root 4096 Apr 17 2014 doc-base
    drwxr-xr-x 4 root root 4096 Apr 17 2014 dpkg
    -rw-r--r-- 1 root root 3095 Apr 14 2014 drirc
    drwxr-xr-x 3 root root 4096 Apr 17 2014 emacs
    -rw-r--r-- 1 root root 96 Apr 17 2014 environment
    drwxr-xr-x 3 root root 4096 Apr 17 2014 firefox
    drwxr-xr-x 4 root root 4096 Apr 17 2014 fonts
    -rw-r--r-- 1 root root 669 Mar 26 23:16 fstab
    drwxr-xr-x 2 root root 4096 Apr 16 2014 fstab.d
    -rw-r----- 1 root fuse 280 May 24 2013 fuse.conf
    -rw-r--r-- 1 root root 2584 Oct 10 2012 gai.conf
    drwxr-xr-x 5 root root 4096 Apr 17 2014 gconf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 gdb
    drwxr-xr-x 4 root root 4096 Apr 17 2014 ghostscript
    drwxr-xr-x 2 root root 4096 Apr 17 2014 gnome
    drwxr-xr-x 2 root root 4096 Apr 17 2014 gnome-app-install
    drwxr-xr-x 2 root root 4096 Apr 17 2014 groff
    -rw-r--r-- 1 root root 911 Mar 27 04:14 group
    -rw------- 1 root root 898 Mar 26 22:35 group-
    drwxr-xr-x 2 root root 4096 Apr 17 2014 grub.d
    -rw-r----- 1 root shadow 760 Mar 27 04:14 gshadow
    -rw------- 1 root root 750 Mar 26 22:35 gshadow-
    drwxr-xr-x 2 root root 4096 Apr 17 2014 gtk-2.0
    drwxr-xr-x 2 root root 4096 Apr 17 2014 gtk-3.0
    -rw-r--r-- 1 root root 4781 Nov 15 2013 hdparm.conf
    -rw-r--r-- 1 root root 92 Feb 19 2014 host.conf
    -rw-r--r-- 1 root root 7 Mar 26 22:22 hostname
    -rw-r--r-- 1 root root 242 Apr 24 08:39 hosts
    -rw-r--r-- 1 root root 411 Apr 17 2014 hosts.allow
    -rw-r--r-- 1 root root 711 Apr 17 2014 hosts.deny
    drwxr-xr-x 2 root root 4096 Apr 17 2014 hp
    drwxr-xr-x 3 root root 4096 Apr 17 2014 ifplugd
    -rw-rw-r-- 1 root root 121 Mar 26 22:22 iftab
    drwxr-xr-x 2 root root 4096 Apr 22 06:02 init
    drwxr-xr-x 2 root root 4096 Apr 22 06:02 init.d
    drwxr-xr-x 5 root root 4096 Mar 26 23:15 initramfs-tools
    -rw-r--r-- 1 root root 1721 Mar 28 2014 inputrc
    drwxr-xr-x 3 root root 4096 May 18 2013 insserv
    -rw-r--r-- 1 root root 771 May 18 2013 insserv.conf
    drwxr-xr-x 2 root root 4096 May 18 2013 insserv.conf.d
    drwxr-xr-x 2 root root 4096 Apr 17 2014 iproute2
    -rw-r--r-- 1 root root 24 Mar 26 23:14 issue
    -rw-r--r-- 1 root root 17 Apr 10 2014 issue.net
    drwxr-xr-x 2 root root 4096 Apr 17 2014 kbd
    drwxr-xr-x 4 root root 4096 Mar 13 2013 kernel
    -rw-r--r-- 1 root root 110 Mar 26 23:13 kernel-img.conf
    -rw-r--r-- 1 root root 1311 Apr 2 2014 kerneloops.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 ldap
    -rw-r--r-- 1 root root 83950 Apr 22 06:02 ld.so.cache
    -rw-r--r-- 1 root root 34 Apr 17 2014 ld.so.conf
    drwxr-xr-x 2 root root 4096 Mar 26 23:15 ld.so.conf.d
    -rw-r--r-- 1 root root 267 Feb 19 2014 legal
    -rw-r--r-- 1 root root 191 Dec 4 2013 libaudit.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 libnl-3
    drwxr-xr-x 2 root root 4096 Dec 11 2013 libpaper.d
    drwxr-xr-x 2 root root 4096 Mar 26 23:11 libreoffice
    drwxr-xr-x 2 root root 4096 Apr 17 2014 lightdm
    -rw-r--r-- 1 root root 2570 Aug 5 2010 locale.alias
    -rw-r--r-- 1 root root 2819 Mar 26 22:35 localtime
    drwxr-xr-x 5 root root 4096 Mar 27 04:14 logcheck
    -rw-r--r-- 1 root root 10551 Feb 16 2014 login.defs
    -rw-r--r-- 1 root root 703 Jan 22 2014 logrotate.conf
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 logrotate.d
    -rw-r--r-- 1 root root 103 Apr 10 2014 lsb-release
    -rw-r--r-- 1 root root 14867 Mar 20 2014 ltrace.conf
    -rw-r--r-- 1 root root 111 Apr 3 2014 magic
    -rw-r--r-- 1 root root 111 Apr 3 2014 magic.mime
    -rw-r--r-- 1 root root 35158 Mar 26 23:13 mailcap
    -rw-r--r-- 1 root root 449 May 13 2013 mailcap.order
    -rw-r--r-- 1 root root 5173 Apr 10 2014 manpath.config
    -rw-r--r-- 1 root root 23922 May 13 2013 mime.types
    -rw-r--r-- 1 root root 956 Feb 19 2014 mke2fs.conf
    drwxr-xr-x 2 root root 4096 Mar 26 23:15 modprobe.d
    -rw-r--r-- 1 root root 255 Mar 26 23:12 modules
    drwxr-xr-x 2 root root 4096 Apr 17 2014 modules-load.d
    -rw-r--r-- 1 root root 917 Apr 24 20:23 mtab
    -rw------- 1 root lightdm 0 Mar 26 23:17 mtab.fuselock
    -rw-r--r-- 1 root root 624 Aug 8 2007 mtools.conf
    drwxr-xr-x 3 root root 4096 Mar 27 04:14 mysql
    -rw-r--r-- 1 root root 8453 Oct 1 2012 nanorc
    -rw-r--r-- 1 root root 2064 Nov 23 2006 netscsid.conf
    drwxr-xr-x 7 root root 4096 Apr 22 08:23 network
    drwxr-xr-x 6 root root 4096 Apr 17 2014 NetworkManager
    -rw-r--r-- 1 root root 91 Feb 19 2014 networks
    drwxr-xr-x 2 root root 4096 Apr 17 2014 newt
    -rw-r--r-- 1 root root 507 Apr 17 2014 nsswitch.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 obex-data-server
    drwxr-xr-x 2 root root 4096 Apr 17 2014 opt
    -rw-r--r-- 1 root root 241 Apr 10 2014 os-release
    -rw-r--r-- 1 root root 552 Jan 31 2014 pam.conf
    drwxr-xr-x 2 root root 4096 Apr 22 06:02 pam.d
    -rw-rw-r-- 1 root root 7 Mar 26 23:12 papersize
    -rw-r--r-- 1 root root 1979 Apr 22 06:02 passwd
    -rw------- 1 root root 1979 Apr 22 06:02 passwd-
    drwxr-xr-x 2 root root 4096 Apr 17 2014 pcmcia
    drwxr-xr-x 4 root root 4096 Apr 17 2014 perl
    drwxr-xr-x 5 root root 4096 Mar 27 06:10 php5
    drwxr-xr-x 2 root root 4096 Apr 17 2014 pki
    drwxr-xr-x 5 root root 4096 Apr 17 2014 pm
    -rw-r--r-- 1 root root 7649 Apr 17 2014 pnm2ppa.conf
    drwxr-xr-x 5 root root 4096 Apr 17 2014 polkit-1
    -rw-rw-r-- 1 root root 350 Mar 26 23:12 popularity-contest.conf
    drwxr-xr-x 8 root root 4096 Apr 17 2014 ppp
    -rw-r--r-- 1 root root 665 Feb 19 2014 profile
    drwxr-xr-x 2 root root 4096 Apr 17 2014 profile.d
    -rw-r--r-- 1 root root 2932 Dec 30 2013 protocols
    drwxr-xr-x 2 root root 4096 Mar 26 23:15 pulse
    drwxr-xr-x 2 root root 4096 Apr 17 2014 python
    drwxr-xr-x 2 root root 4096 Apr 17 2014 python2.7
    drwxr-xr-x 2 root root 4096 Apr 17 2014 python3
    drwxr-xr-x 2 root root 4096 Apr 17 2014 python3.4
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 rc0.d
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 rc1.d
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 rc2.d
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 rc3.d
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 rc4.d
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 rc5.d
    drwxr-xr-x 2 root root 4096 Mar 27 05:36 rc6.d
    -rwxr-xr-x 1 root root 306 Apr 17 2014 rc.local
    drwxr-xr-x 2 root root 4096 Mar 26 23:13 rcS.d
    drwxr-xr-x 5 root root 4096 Apr 17 2014 resolvconf
    lrwxrwxrwx 1 root root 29 Mar 26 22:22 resolv.conf -> ../run/resolvconf/resolv.conf
    -rwxr-xr-x 1 root root 268 Feb 4 2014 rmt
    -rw-r--r-- 1 root root 887 Dec 30 2013 rpc
    -rw-r--r-- 1 root root 1245 Apr 18 2013 rsyslog.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 rsyslog.d
    drwxr-xr-x 3 root root 4096 Apr 17 2014 samba
    drwxr-xr-x 3 root root 4096 Apr 17 2014 sane.d
    -rw-r--r-- 1 root root 4038 Feb 16 2014 securetty
    drwxr-xr-x 4 root root 4096 Apr 17 2014 security
    drwxr-xr-x 2 root root 4096 Apr 17 2014 selinux
    -rw-r--r-- 1 root root 10344 Jan 15 2014 sensors3.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 sensors.d
    -rw-r--r-- 1 root root 19558 Dec 30 2013 services
    drwxr-xr-x 2 root root 4096 Apr 17 2014 sgml
    -rw-r----- 1 root shadow 1159 Apr 22 07:52 shadow
    -rw------- 1 root root 1159 Apr 22 06:02 shadow-
    -rw-r--r-- 1 root root 73 Apr 17 2014 shells
    -rw-r--r-- 1 root root 1803 Mar 7 2014 signond.conf
    drwxr-xr-x 3 root root 4096 Apr 17 2014 signon-ui
    drwxr-xr-x 2 root root 4096 Apr 17 2014 skel
    drwxr-xr-x 4 root root 4096 Apr 17 2014 speech-dispatcher
    drwxr-xr-x 2 root root 4096 Apr 22 06:02 ssh
    drwxr-xr-x 4 root root 4096 Apr 17 2014 ssl
    -rw-r--r-- 1 root root 21 Mar 26 22:35 subgid
    -rw------- 1 root root 0 Apr 17 2014 subgid-
    -rw-r--r-- 1 root root 21 Mar 26 22:35 subuid
    -rw------- 1 root root 0 Apr 17 2014 subuid-
    -r--r----- 1 root root 745 Feb 10 2014 sudoers
    drwxr-xr-x 2 root root 4096 Apr 17 2014 sudoers.d
    -rw-r--r-- 1 root root 2084 Mar 31 2013 sysctl.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 sysctl.d
    drwxr-xr-x 3 root root 4096 Apr 17 2014 systemd
    drwxr-xr-x 2 root root 4096 Apr 17 2014 terminfo
    drwxr-xr-x 2 root root 4096 Mar 26 23:11 thunderbird
    -rw-r--r-- 1 root root 20 Mar 26 22:35 timezone
    -rw-r--r-- 1 root root 1314 Apr 24 20:22 tpvmlp.conf
    -rw-r--r-- 1 root root 645 Jan 20 2014 ts.conf
    -rw-r--r-- 1 root root 111 Apr 17 2014 ubuntukylin-release
    -rw-r--r-- 1 root root 1260 Jun 30 2013 ucf.conf
    drwxr-xr-x 4 root root 4096 Apr 17 2014 udev
    drwxr-xr-x 2 root root 4096 Mar 10 2014 udisks2
    drwxr-xr-x 3 root root 4096 Apr 17 2014 ufw
    -rw-r--r-- 1 root root 321 Jun 20 2013 updatedb.conf
    drwxr-xr-x 3 root root 4096 Apr 17 2014 update-manager
    drwxr-xr-x 2 root root 4096 Apr 17 2014 update-motd.d
    drwxr-xr-x 2 root root 4096 Apr 9 2014 update-notifier
    drwxr-xr-x 2 root root 4096 Apr 17 2014 UPower
    -rw-r--r-- 1 root root 222 Apr 11 2014 upstart-xsessions
    -rw-r--r-- 1 root root 888 Apr 8 2014 usb_modeswitch.conf
    drwxr-xr-x 2 root root 4096 Apr 8 2014 usb_modeswitch.d
    -rw-r--r-- 1 root root 51 Aug 15 2013 vdpau_wrapper.cfg
    drwxr-xr-x 2 root root 4096 Apr 17 2014 vim
    drwxr-xr-x 4 root root 4096 Mar 26 23:16 vmware-tools
    lrwxrwxrwx 1 root root 23 Mar 26 22:17 vtrgb -> /etc/alternatives/vtrgb
    -rw-r--r-- 1 root root 4812 Feb 7 2014 wgetrc
    -rw-r--r-- 1 root root 1343 Jan 9 2007 wodim.conf
    drwxr-xr-x 2 root root 4096 Apr 17 2014 wpa_supplicant
    drwxr-xr-x 11 root root 4096 Apr 17 2014 X11
    drwxr-xr-x 4 root root 4096 Apr 17 2014 xdg
    drwxr-xr-x 2 root root 4096 Apr 17 2014 xml
    drwxr-xr-x 2 root root 4096 Apr 17 2014 xul-ext
    -rw-r--r-- 1 root root 349 Jun 26 2012 zsh_command_not_found
    root@ubuntu:/etc# cd ~
    root@ubuntu:~# git config
    usage: git config [options]

    Config file location
    --global use global config file
    --system use system config file
    --local use repository config file
    -f, --file <file> use given config file
    --blob <blob-id> read config from given blob object

    Action
    --get get value: name [value-regex]
    --get-all get all values: key [value-regex]
    --get-regexp get values for regexp: name-regex [value-regex]
    --get-urlmatch get value specific for the URL: section[.var] URL
    --replace-all replace all matching variables: name value [value_regex]
    --add add a new variable: name value
    --unset remove a variable: name [value-regex]
    --unset-all remove all matches: name [value-regex]
    --rename-section rename section: old-name new-name
    --remove-section remove a section: name
    -l, --list list all
    -e, --edit open an editor
    --get-color <slot> find the color configured: [default]
    --get-colorbool <slot>
    find the color setting: [stdout-is-tty]

    Type
    --bool value is "true" or "false"
    --int value is decimal number
    --bool-or-int value is --bool or --int
    --path value is a path (file or directory name)

    Other
    -z, --null terminate values with NUL byte
    --includes respect include directives on lookup

    root@ubuntu:~# git config --global user.name "zhangbingshuai"
    root@ubuntu:~# git config --global user.email "429377083@qq.com"
    root@ubuntu:~# where git
    No command 'where' found, did you mean:
    Command 'gwhere' from package 'gwhere' (universe)
    where: command not found
    root@ubuntu:~# whereis git
    git: /usr/bin/git /usr/bin/X11/git /usr/share/man/man1/git.1.gz
    root@ubuntu:~# ls
    root@ubuntu:~# ls
    root@ubuntu:~# ls -l
    total 0
    root@ubuntu:~# su
    root@ubuntu:~# su lovezbs
    lovezbs@ubuntu:/root$ ls
    ls: cannot open directory .: Permission denied
    lovezbs@ubuntu:/root$ cd ~
    lovezbs@ubuntu:~$ ls -l
    total 116
    -rw-rw-r-- 1 lovezbs lovezbs 15202 Apr 22 07:08 c:history.txt
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Desktop
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Documents
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 27 03:23 Downloads
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:52 file.php
    drwxr-xr-x 3 root root 4096 Apr 24 21:21 git
    -rw-r--r-- 1 root root 1769 Apr 24 20:58 git.txt
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:48 <jslfjlsfj>
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Music
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 21:56 one
    -rw-rw-r-- 1 lovezbs lovezbs 26064 Mar 30 01:51 phpinfo.txt
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Pictures
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Public
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Templates
    -rw-rw-r-- 1 lovezbs lovezbs 21 Mar 30 01:49 test.php
    -rw-rw-r-- 1 lovezbs lovezbs 8105 Apr 22 07:11 test.txt
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 21:55 two
    -rw-rw-r-- 1 lovezbs lovezbs 0 Mar 30 01:52 <?var_dump(_FILE_) ?>
    drwxr-xr-x 2 lovezbs lovezbs 4096 Mar 26 23:17 Videos
    -rw-rw-r-- 1 lovezbs lovezbs 118 Apr 22 07:12 xixi.txt
    drwxrwxr-x 2 lovezbs lovezbs 4096 Mar 27 18:37 zbs
    -rw-rw-r-- 1 lovezbs lovezbs 81 Apr 8 04:28 >zbs.php
    lovezbs@ubuntu:~$ cd git/
    lovezbs@ubuntu:~/git$ ls -l
    total 4
    drwxr-xr-x 3 root root 4096 Apr 24 21:22 Test
    lovezbs@ubuntu:~/git$ cd Test/
    lovezbs@ubuntu:~/git/Test$ ls
    read.txt
    lovezbs@ubuntu:~/git/Test$ cd ..
    lovezbs@ubuntu:~/git$ ls
    Test
    lovezbs@ubuntu:~/git$ rm -rf Test
    rm: cannot remove ?.est/.git/COMMIT_EDITMSG?. Permission denied
    rm: cannot remove ?.est/.git/config?. Permission denied
    rm: cannot remove ?.est/.git/objects/82/7439f80642bb1a21f2649a189c0cdd283ccde8?. Permission denied
    rm: cannot remove ?.est/.git/objects/pack?. Permission denied
    rm: cannot remove ?.est/.git/objects/45/8128acafbefbe2063632a7c607d7928ce5771b?. Permission denied
    rm: cannot remove ?.est/.git/objects/info?. Permission denied
    rm: cannot remove ?.est/.git/objects/91/03e351942a9c160eaf80737476a4d19ce3d808?. Permission denied
    rm: cannot remove ?.est/.git/refs/remotes/origin/master?. Permission denied
    rm: cannot remove ?.est/.git/refs/heads/master?. Permission denied
    rm: cannot remove ?.est/.git/refs/tags?. Permission denied
    rm: cannot remove ?.est/.git/branches?. Permission denied
    rm: cannot remove ?.est/.git/hooks/commit-msg.sample?. Permission denied
    rm: cannot remove ?.est/.git/hooks/pre-push.sample?. Permission denied
    rm: cannot remove ?.est/.git/hooks/prepare-commit-msg.sample?. Permission denied
    rm: cannot remove ?.est/.git/hooks/applypatch-msg.sample?. Permission denied
    rm: cannot remove ?.est/.git/hooks/pre-rebase.sample?. Permission denied
    rm: cannot remove ?.est/.git/hooks/post-update.sample?. Permission denied
    rm: cannot remove ?.est/.git/hooks/pre-applypatch.sample?. Permission denied
    rm: cannot remove ?.est/.git/hooks/pre-commit.sample?. Permission denied
    rm: cannot remove ?.est/.git/hooks/update.sample?. Permission denied
    rm: cannot remove ?.est/.git/description?. Permission denied
    rm: cannot remove ?.est/.git/HEAD?. Permission denied
    rm: cannot remove ?.est/.git/logs/refs/remotes/origin/master?. Permission denied
    rm: cannot remove ?.est/.git/logs/refs/heads/master?. Permission denied
    rm: cannot remove ?.est/.git/logs/HEAD?. Permission denied
    rm: cannot remove ?.est/.git/index?. Permission denied
    rm: cannot remove ?.est/.git/info/exclude?. Permission denied
    rm: cannot remove ?.est/read.txt?. Permission denied
    lovezbs@ubuntu:~/git$ ls -l
    total 4
    drwxr-xr-x 3 root root 4096 Apr 24 21:22 Test
    lovezbs@ubuntu:~/git$ cd Test/
    lovezbs@ubuntu:~/git/Test$ ls
    read.txt
    lovezbs@ubuntu:~/git/Test$ vi test1.txt
    lovezbs@ubuntu:~/git/Test$ cat test1.txt
    cat: test1.txt: No such file or directory
    lovezbs@ubuntu:~/git/Test$ sudo vi test1.txt
    [sudo] password for lovezbs:
    lovezbs@ubuntu:~/git/Test$ cat test1.txt
    hello , sedconds f alfjsalfjaf
    lovezbs@ubuntu:~/git/Test$ vi test1.txt
    lovezbs@ubuntu:~/git/Test$ sudo vi test1.txt
    lovezbs@ubuntu:~/git/Test$ cat test1.txt
    This is the second page of GitHub page !
    hello , sedconds f alfjsalfjaf
    lovezbs@ubuntu:~/git/Test$ git status
    On branch master
    Your branch is up-to-date with 'origin/master'.

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

    test1.txt

    nothing added to commit but untracked files present (use "git add" to track)
    lovezbs@ubuntu:~/git/Test$ git add
    fatal: Unable to create '/home/lovezbs/git/Test/.git/index.lock': Permission denied
    lovezbs@ubuntu:~/git/Test$ git add test1.txt
    fatal: Unable to create '/home/lovezbs/git/Test/.git/index.lock': Permission denied
    lovezbs@ubuntu:~/git/Test$ su root
    Password:
    root@ubuntu:/home/lovezbs/git/Test# git add test1.txt
    root@ubuntu:/home/lovezbs/git/Test# git status
    On branch master
    Your branch is up-to-date with 'origin/master'.

    Changes to be committed:
    (use "git reset HEAD <file>..." to unstage)

    new file: test1.txt

    root@ubuntu:/home/lovezbs/git/Test# git push
    Username for 'https://github.com': lovezbs66
    Password for 'https://lovezbs66@github.com':
    Everything up-to-date
    root@ubuntu:/home/lovezbs/git/Test# git status
    On branch master
    Your branch is up-to-date with 'origin/master'.

    Changes to be committed:
    (use "git reset HEAD <file>..." to unstage)

    new file: test1.txt

    root@ubuntu:/home/lovezbs/git/Test# git push
    Username for 'https://github.com': lovezbs66
    Password for 'https://lovezbs66@github.com':
    Everything up-to-date
    root@ubuntu:/home/lovezbs/git/Test# git status
    On branch master
    Your branch is up-to-date with 'origin/master'.

    Changes to be committed:
    (use "git reset HEAD <file>..." to unstage)

    new file: test1.txt

    root@ubuntu:/home/lovezbs/git/Test# ls
    read.txt test1.txt
    root@ubuntu:/home/lovezbs/git/Test#

    浪漫家园,没事就来逛逛
  • 相关阅读:
    2018-2019-1 20165208 实验三 实时系统
    2018-2019-1 20165208 《信息安全系统设计基础》第七️周学习总结
    2018-2019-1 20165211 20165230 20165208 实验二 固件程序设计
    2018-2019-1 20165208 《信息安全系统设计基础》第六周学习总结
    2018-2019-1 20165208 《信息安全系统设计基础》第5周学习总结
    2017-2018-2 20155315《网络对抗技术》Exp5 :MSF基础应用
    2017-2018-2 20155315《网络对抗技术》Exp4:恶意代码分析
    2017-2018-2 20155315《网络对抗技术》Exp3:免杀原理与实践
    2017-2018-2 20155315《网络对抗技术》Exp2:后门原理与实践
    2017-2018-2 20155315《网络对抗技术》Exp1:PC平台逆向破解
  • 原文地址:https://www.cnblogs.com/lovezbs/p/4457018.html
Copyright © 2020-2023  润新知