zoukankan      html  css  js  c++  java
  • 郭博演示git

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git
    usage: git [--version] [--help] [-C <path>] [-c name=value]
    [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
    [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
    [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
    <command> [<args>]

    These are common Git commands used in various situations:

    start a working area (see also: git help tutorial)
    clone Clone a repository into a new directory
    init Create an empty Git repository or reinitialize an existing one

    work on the current change (see also: git help everyday)
    add Add file contents to the index
    mv Move or rename a file, a directory, or a symlink
    reset Reset current HEAD to the specified state
    rm Remove files from the working tree and from the index

    examine the history and state (see also: git help revisions)
    bisect Use binary search to find the commit that introduced a bug
    grep Print lines matching a pattern
    log Show commit logs
    show Show various types of objects
    status Show the working tree status

    grow, mark and tweak your common history
    branch List, create, or delete branches
    checkout Switch branches or restore working tree files
    commit Record changes to the repository
    diff Show changes between commits, commit and working tree, etc
    merge Join two or more development histories together
    rebase Forward-port local commits to the updated upstream head
    tag Create, list, delete or verify a tag object signed with GPG

    collaborate (see also: git help workflows)
    fetch Download objects and refs from another repository
    pull Fetch from and integrate with another repository or a local branch
    push Update remote refs along with associated objects

    'git help -a' and 'git help -g' list available subcommands and some
    concept guides. See 'git help <command>' or 'git help <concept>'
    to read about a specific subcommand or concept.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git add TEST.C

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit -m "test.c version 1"
    [master 6c55d90] test.c version 1
    1 file changed, 6 insertions(+)
    create mode 100644 TEST.C

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git
    usage: git [--version] [--help] [-C <path>] [-c name=value]
    [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
    [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
    [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
    <command> [<args>]

    These are common Git commands used in various situations:

    start a working area (see also: git help tutorial)
    clone Clone a repository into a new directory
    init Create an empty Git repository or reinitialize an existing one

    work on the current change (see also: git help everyday)
    add Add file contents to the index
    mv Move or rename a file, a directory, or a symlink
    reset Reset current HEAD to the specified state
    rm Remove files from the working tree and from the index

    examine the history and state (see also: git help revisions)
    bisect Use binary search to find the commit that introduced a bug
    grep Print lines matching a pattern
    log Show commit logs
    show Show various types of objects
    status Show the working tree status

    grow, mark and tweak your common history
    branch List, create, or delete branches
    checkout Switch branches or restore working tree files
    commit Record changes to the repository
    diff Show changes between commits, commit and working tree, etc
    merge Join two or more development histories together
    rebase Forward-port local commits to the updated upstream head
    tag Create, list, delete or verify a tag object signed with GPG

    collaborate (see also: git help workflows)
    fetch Download objects and refs from another repository
    pull Fetch from and integrate with another repository or a local branch
    push Update remote refs along with associated objects

    'git help -a' and 'git help -g' list available subcommands and some
    concept guides. See 'git help <command>' or 'git help <concept>'
    to read about a specific subcommand or concept.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (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 directory clean

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit -m "test.c version 2"
    On branch master
    Your branch is ahead of 'origin/master' by 1 commit.
    (use "git push" to publish your local commits)
    Changes not staged for commit:
    modified: TEST.C

    no changes added to commit

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit
    On branch master
    Your branch is ahead of 'origin/master' by 1 commit.
    (use "git push" to publish your local commits)
    Changes not staged for commit:
    modified: TEST.C

    no changes added to commit

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ 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)

    Counting objects: 3, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 328 bytes | 0 bytes/s, done.
    Total 3 (delta 1), reused 0 (delta 0)
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    cdf3042..6c55d90 master -> master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit -m "test.c version 2"
    On branch master
    Your branch is up-to-date with 'origin/master'.
    Changes not staged for commit:
    modified: TEST.C

    no changes added to commit

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit -m "test.c version 2"
    On branch master
    Your branch is up-to-date with 'origin/master'.
    Changes not staged for commit:
    modified: TEST.C

    no changes added to commit

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git
    usage: git [--version] [--help] [-C <path>] [-c name=value]
    [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
    [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
    [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
    <command> [<args>]

    These are common Git commands used in various situations:

    start a working area (see also: git help tutorial)
    clone Clone a repository into a new directory
    init Create an empty Git repository or reinitialize an existing one

    work on the current change (see also: git help everyday)
    add Add file contents to the index
    mv Move or rename a file, a directory, or a symlink
    reset Reset current HEAD to the specified state
    rm Remove files from the working tree and from the index

    examine the history and state (see also: git help revisions)
    bisect Use binary search to find the commit that introduced a bug
    grep Print lines matching a pattern
    log Show commit logs
    show Show various types of objects
    status Show the working tree status

    grow, mark and tweak your common history
    branch List, create, or delete branches
    checkout Switch branches or restore working tree files
    commit Record changes to the repository
    diff Show changes between commits, commit and working tree, etc
    merge Join two or more development histories together
    rebase Forward-port local commits to the updated upstream head
    tag Create, list, delete or verify a tag object signed with GPG

    collaborate (see also: git help workflows)
    fetch Download objects and refs from another repository
    pull Fetch from and integrate with another repository or a local branch
    push Update remote refs along with associated objects

    'git help -a' and 'git help -g' list available subcommands and some
    concept guides. See 'git help <command>' or 'git help <concept>'
    to read about a specific subcommand or concept.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git status
    On branch master
    Your branch is up-to-date with 'origin/master'.
    Changes not staged for commit:
    (use "git add <file>..." to update what will be committed)
    (use "git checkout -- <file>..." to discard changes in working directory)

    modified: TEST.C

    no changes added to commit (use "git add" and/or "git commit -a")

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit -a "test.c version 2"
    fatal: Paths with -a does not make sense.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit TEST.C -a "test.c version 2"
    fatal: Paths with -a does not make sense.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit -a TEST.C
    fatal: Paths with -a does not make sense.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git add TEST.C

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit
    Aborting commit due to empty commit message.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit -m "test.c version 2"
    [master 518f052] test.c version 2
    1 file changed, 5 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ 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)

    Counting objects: 3, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 356 bytes | 0 bytes/s, done.
    Total 3 (delta 1), reused 0 (delta 0)
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    6c55d90..518f052 master -> master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git pull
    Already up-to-date.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit TEST.C -m "TEST.C version 3"
    [master 19457b5] TEST.C version 3
    1 file changed, 1 insertion(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit TEST.C -m "TEST.C version 4"
    [master a675169] TEST.C version 4
    1 file changed, 1 insertion(+), 1 deletion(-)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git status
    On branch master
    Your branch is ahead of 'origin/master' by 2 commits.
    (use "git push" to publish your local commits)
    nothing to commit, working directory clean

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit TEST.C -m "TEST.C version 5"
    [master f5655f0] TEST.C version 5
    1 file changed, 2 insertions(+), 2 deletions(-)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ 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)

    Counting objects: 9, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (9/9), done.
    Writing objects: 100% (9/9), 842 bytes | 0 bytes/s, done.
    Total 9 (delta 6), reused 0 (delta 0)
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    518f052..f5655f0 master -> master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git branch
    * master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git branch develop

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git branch
    develop
    * master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git checkout develop
    Switched to branch 'develop'

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch
    * develop
    master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git commit -m "TEST.C add function func"
    On branch develop
    Changes not staged for commit:
    modified: TEST.C

    no changes added to commit

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git commit -m "TEST.C add function func"
    ]On branch develop
    Changes not staged for commit:
    modified: TEST.C

    no changes added to commit

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git commit TEST.C -m "TEST.C add function func"
    [develop aa92700] TEST.C add function func
    1 file changed, 5 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch master
    fatal: A branch named 'master' already exists.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git checkout master
    Switched to branch 'master'
    Your branch is up-to-date with 'origin/master'.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git checkout develop
    Switched to branch 'develop'

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git commit
    On branch develop
    nothing to commit, working directory clean

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch feature-study

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git checkout feature-study
    Switched to branch 'feature-study'

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (feature-study)
    $ git commit TEST.C -m "Feature add func study"
    [feature-study e9761c1] Feature add func study
    1 file changed, 5 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (feature-study)
    $ git
    usage: git [--version] [--help] [-C <path>] [-c name=value]
    [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
    [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
    [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
    <command> [<args>]

    These are common Git commands used in various situations:

    start a working area (see also: git help tutorial)
    clone Clone a repository into a new directory
    init Create an empty Git repository or reinitialize an existing one

    work on the current change (see also: git help everyday)
    add Add file contents to the index
    mv Move or rename a file, a directory, or a symlink
    reset Reset current HEAD to the specified state
    rm Remove files from the working tree and from the index

    examine the history and state (see also: git help revisions)
    bisect Use binary search to find the commit that introduced a bug
    grep Print lines matching a pattern
    log Show commit logs
    show Show various types of objects
    status Show the working tree status

    grow, mark and tweak your common history
    branch List, create, or delete branches
    checkout Switch branches or restore working tree files
    commit Record changes to the repository
    diff Show changes between commits, commit and working tree, etc
    merge Join two or more development histories together
    rebase Forward-port local commits to the updated upstream head
    tag Create, list, delete or verify a tag object signed with GPG

    collaborate (see also: git help workflows)
    fetch Download objects and refs from another repository
    pull Fetch from and integrate with another repository or a local branch
    push Update remote refs along with associated objects

    'git help -a' and 'git help -g' list available subcommands and some
    concept guides. See 'git help <command>' or 'git help <concept>'
    to read about a specific subcommand or concept.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (feature-study)
    $ git merge
    fatal: No remote for the current branch.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (feature-study)
    $ git merge develop
    Already up-to-date.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (feature-study)
    $ git merge
    fatal: No remote for the current branch.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (feature-study)
    $ git merge --help
    Launching default browser to display HTML ...

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (feature-study)
    $ git checkout develop
    Switched to branch 'develop'

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git merge feature-study --no-ff -m "merge feature_study into develop"
    Merge made by the 'recursive' strategy.
    TEST.C | 5 +++++
    1 file changed, 5 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git status
    On branch develop
    nothing to commit, working directory clean

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch
    * develop
    feature-study
    master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git d
    describe diff difftool

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git -d fetch
    Unknown option: -d
    usage: git [--version] [--help] [-C <path>] [-c name=value]
    [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
    [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
    [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
    <command> [<args>]

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch feature-study -d
    Deleted branch feature-study (was e9761c1).

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch
    * develop
    master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ 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)

    fatal: The current branch develop has no upstream branch.
    To push the current branch and set the remote as upstream, use

    git push --set-upstream origin develop


    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git push origin develop
    Counting objects: 7, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (7/7), done.
    Writing objects: 100% (7/7), 732 bytes | 0 bytes/s, done.
    Total 7 (delta 4), reused 0 (delta 0)
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    * [new branch] develop -> develop

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ 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)

    fatal: The current branch develop has no upstream branch.
    To push the current branch and set the remote as upstream, use

    git push --set-upstream origin develop


    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git push origin develop
    Everything up-to-date

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch
    * develop
    master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git checkout master
    Switched to branch 'master'
    Your branch is up-to-date with 'origin/master'.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git merge develop --no-ff -m "merge develop into master"
    Merge made by the 'recursive' strategy.
    TEST.C | 10 ++++++++++
    1 file changed, 10 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ 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)

    Counting objects: 1, done.
    Writing objects: 100% (1/1), 214 bytes | 0 bytes/s, done.
    Total 1 (delta 0), reused 0 (delta 0)
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    f5655f0..c4e4c74 master -> master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git branch test

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit -m "add test func"
    On branch master
    Your branch is up-to-date with 'origin/master'.
    Changes not staged for commit:
    modified: TEST.C

    no changes added to commit

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git commit TEST.C -m "add test func"
    [master e92e4ee] add test func
    1 file changed, 5 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git checkout test
    Switched to branch 'test'

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (test)
    $ git commit TEST.C -m "test func "
    error: unknown non-ascii option in string: `-吗m-m'
    usage: git commit [<options>] [--] <pathspec>...

    -q, --quiet suppress summary after successful commit
    -v, --verbose show diff in commit message template

    Commit message options
    -F, --file <file> read message from file
    --author <author> override author for commit
    --date <date> override date for commit
    -m, --message <message>
    commit message
    -c, --reedit-message <commit>
    reuse and edit message from specified commit
    -C, --reuse-message <commit>
    reuse message from specified commit
    --fixup <commit> use autosquash formatted message to fixup specified commit
    --squash <commit> use autosquash formatted message to squash specified commit
    --reset-author the commit is authored by me now (used with -C/-c/--amend)
    -s, --signoff add Signed-off-by:
    -t, --template <file>
    use specified template file
    -e, --edit force edit of commit
    --cleanup <default> how to strip spaces and #comments from message
    --status include status in commit message template
    -S, --gpg-sign[=<key-id>]
    GPG sign commit

    Commit contents options
    -a, --all commit all changed files
    -i, --include add specified files to index for commit
    --interactive interactively add files
    -p, --patch interactively add changes
    -o, --only commit only specified files
    -n, --no-verify bypass pre-commit hook
    --dry-run show what would be committed
    --short show status concisely
    --branch show branch information
    --porcelain machine-readable output
    --long show status in long format (default)
    -z, --null terminate entries with NUL
    --amend amend previous commit
    --no-post-rewrite bypass post-rewrite hook
    -u, --untracked-files[=<mode>]
    show untracked files, optional modes: all, normal, no. (Default: all)


    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (test)
    $ git commit TEST.C -m "test func"
    [test b69fb1b] test func
    1 file changed, 5 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (test)
    $ git checkout develop
    Switched to branch 'develop'

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git merge test --no-ff -m "merge test branch"
    Merge made by the 'recursive' strategy.
    TEST.C | 5 +++++
    1 file changed, 5 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git push origin test
    Counting objects: 3, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 302 bytes | 0 bytes/s, done.
    Total 3 (delta 2), reused 0 (delta 0)
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    * [new branch] test -> test

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ 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)

    fatal: The current branch develop has no upstream branch.
    To push the current branch and set the remote as upstream, use

    git push --set-upstream origin develop


    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git push --set-upstream origin develop
    Counting objects: 1, done.
    Writing objects: 100% (1/1), 209 bytes | 0 bytes/s, done.
    Total 1 (delta 0), reused 0 (delta 0)
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    e0b581c..b50c905 develop -> develop
    Branch develop set up to track remote branch develop from origin.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ 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)

    Everything up-to-date

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch
    * develop
    master
    test

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git branch develop
    fatal: A branch named 'develop' already exists.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git master
    git: 'master' is not a git command. See 'git --help'.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (develop)
    $ git checkout master
    Switched to branch 'master'
    Your branch is ahead of 'origin/master' by 1 commit.
    (use "git push" to publish your local commits)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git merge develop -m"merge develop"
    Auto-merging TEST.C
    Merge made by the 'recursive' strategy.
    TEST.C | 5 +++++
    1 file changed, 5 insertions(+)

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ 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)

    Counting objects: 6, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (6/6), done.
    Writing objects: 100% (6/6), 557 bytes | 0 bytes/s, done.
    Total 6 (delta 4), reused 0 (delta 0)
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    c4e4c74..202c644 master -> master

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git branch test -d
    Deleted branch test (was b69fb1b).

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git push origin
    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)

    Everything up-to-date

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git push origin --help
    usage: git push [<options>] [<repository> [<refspec>...]]

    -v, --verbose be more verbose
    -q, --quiet be more quiet
    --repo <repository> repository
    --all push all refs
    --mirror mirror all refs
    --delete delete refs
    --tags push tags (can't be used with --all or --mirror)
    -n, --dry-run dry run
    --porcelain machine-readable output
    -f, --force force updates
    --force-with-lease[=<refname>:<expect>]
    require old value of ref to be at this value
    --recurse-submodules[=<check|on-demand|no>]
    control recursive pushing of submodules
    --thin use thin pack
    --receive-pack <receive-pack>
    receive pack program
    --exec <receive-pack>
    receive pack program
    -u, --set-upstream set upstream for git pull/status
    --progress force progress reporting
    --prune prune locally removed refs
    --no-verify bypass pre-push hook
    --follow-tags push missing but relevant tags
    --signed[=<yes|no|if-asked>]
    GPG sign the push
    --atomic request atomic transaction on remote side


    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git push study origin --ser-upstream -d
    error: unknown option `ser-upstream'
    usage: git push [<options>] [<repository> [<refspec>...]]

    -v, --verbose be more verbose
    -q, --quiet be more quiet
    --repo <repository> repository
    --all push all refs
    --mirror mirror all refs
    --delete delete refs
    --tags push tags (can't be used with --all or --mirror)
    -n, --dry-run dry run
    --porcelain machine-readable output
    -f, --force force updates
    --force-with-lease[=<refname>:<expect>]
    require old value of ref to be at this value
    --recurse-submodules[=<check|on-demand|no>]
    control recursive pushing of submodules
    --thin use thin pack
    --receive-pack <receive-pack>
    receive pack program
    --exec <receive-pack>
    receive pack program
    -u, --set-upstream set upstream for git pull/status
    --progress force progress reporting
    --prune prune locally removed refs
    --no-verify bypass pre-push hook
    --follow-tags push missing but relevant tags
    --signed[=<yes|no|if-asked>]
    GPG sign the push
    --atomic request atomic transaction on remote side


    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git push study origin --delete
    fatal: 'study' does not appear to be a git repository
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git push origin --delete
    fatal: --delete doesn't make sense without any refs

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git push origin --delete study
    error: unable to delete 'study': remote ref does not exist
    error: failed to push some refs to 'https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git'

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git push origin --delete study
    error: unable to delete 'study': remote ref does not exist
    error: failed to push some refs to 'https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git'

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $ git push origin --delete test
    To https://git.oschina.net/sandstorm/STM32F0_IR_BUZZER.git
    - [deleted] test

    sand@storm MINGW32 /e/git_test/STM32F0_IR_BUZZER (master)
    $

    参考1: http://zengrong.net/post/1746.htm

    参考2: http://git.oschina.net

  • 相关阅读:
    bzoj 2002: [Hnoi2010]Bounce 弹飞绵羊(分块算法)
    hdu 3652 "B-number"(数位DP)
    数位DP+其他
    hdu 4352 "XHXJ's LIS"(数位DP+状压DP+LIS)
    CodeForces 55D "Beautiful numbers"(数位DP+离散化处理)
    洛谷 P1163"银行贷款"(二分)
    ZOJ-3872-Beauty of Array-思维
    洛谷P3951 小凯的疑惑
    CodeForces
    CodeForces
  • 原文地址:https://www.cnblogs.com/mrsandstorm/p/5708884.html
Copyright © 2011-2022 走看看