Skip to content

Instantly share code, notes, and snippets.

@CharlieYe0205
Last active July 12, 2020 01:02
Show Gist options
  • Select an option

  • Save CharlieYe0205/2b36ef5056af581553a25f7011ea7918 to your computer and use it in GitHub Desktop.

Select an option

Save CharlieYe0205/2b36ef5056af581553a25f7011ea7918 to your computer and use it in GitHub Desktop.

Revisions

  1. CharlieYe0205 revised this gist Jul 12, 2020. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions git_fun.md
    Original file line number Diff line number Diff line change
    @@ -38,5 +38,12 @@ tag
    git tag -a v-1.0
    ```

    git ignore
    ```
    git rm -r --cached .
    git add .
    git commit -m "fixed untracked files"
    ```


    ###### Happy Coding ^_^
  2. CharlieYe0205 revised this gist Sep 1, 2019. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions git_fun.md
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,11 @@ fix mac os upgrade issue
    sudo xcode-select --install
    ```

    update commit message
    ```shell
    git commit --amend
    ```

    stash
    ```shell
    git stash
    @@ -28,5 +33,10 @@ git stash drop stash@{1}
    git stash branch new_changes # create branch, apply stash and drop stash
    ```

    tag
    ```shell
    git tag -a v-1.0
    ```


    ###### Happy Coding ^_^
  3. CharlieYe0205 revised this gist Sep 1, 2019. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions git_fun.md
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,12 @@ git stash apply
    git stash drop

    git stash pop

    git stash show stash@{1}
    git stash apply stash@{1}
    git stash drop stash@{1}

    git stash branch new_changes # create branch, apply stash and drop stash
    ```


  4. CharlieYe0205 revised this gist Sep 1, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions git_fun.md
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,7 @@ stash
    ```shell
    git stash
    git stash -u
    git stash save "message" # for multiple stash

    git stash list

  5. CharlieYe0205 revised this gist Sep 1, 2019. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion git_fun.md
    Original file line number Diff line number Diff line change
    @@ -19,4 +19,7 @@ git stash apply
    git stash drop

    git stash pop
    ```
    ```


    ###### Happy Coding ^_^
  6. CharlieYe0205 revised this gist Sep 1, 2019. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions git_fun.md
    Original file line number Diff line number Diff line change
    @@ -6,4 +6,17 @@ git config --global core.pager "less -FRSX"
    fix mac os upgrade issue
    ```shell
    sudo xcode-select --install
    ```

    stash
    ```shell
    git stash
    git stash -u

    git stash list

    git stash apply
    git stash drop

    git stash pop
    ```
  7. CharlieYe0205 revised this gist Sep 1, 2019. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions git_fun.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,9 @@
    print git command results to stdout
    ```shell
    git config --global core.pager "less -FRSX"
    ```

    fix mac os upgrade issue
    ```shell
    sudo xcode-select --install
    ```
  8. CharlieYe0205 created this gist Sep 1, 2019.
    4 changes: 4 additions & 0 deletions git_fun.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    print git command results to stdout
    ```shell
    git config --global core.pager "less -FRSX"
    ```