Content-Length: 248447 | pFad | http://github.com/arenchen/Tips/tree/master/Git

BA Tips/Git at master · arenchen/Tips · GitHub
Skip to content

Latest commit

 

History

History

Git

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Git-Tips

Create an archive of changed files

git archive -o update.zip stash $(git diff --name-only HEAD)

OR

zip update.zip $(git diff --name-only HEAD)

Delete remote last commit

git reset --hard HEAD^
git push

Sometimes need to Recovery

# Show log histories
git reflog show

# replace [Number] to HEAD Index
git reset HEAD@{[Number]}

Restore submodules from .gitmodules

#!/bin/sh

set -e

git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
    while read path_key path
    do
        url_key=$(echo $path_key | sed 's/\.path/.url/')
        url=$(git config -f .gitmodules --get "$url_key")
        git submodule add $url $path
    done

Git Config

# 不驗證 SSL 憑證
git config --global http.sslverify false

# 自動轉換換行符號
git config --global core.autocrlf true








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/arenchen/Tips/tree/master/Git

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy