Created by on 11/10/2020 , Last updated: 01/08/2021.
👉  github shields Star me if it’s helpful.
Get the meaning of Git command: just copy it and paste to explainshell

1. Stats of submission

    git shortlog -sne

2. List log in fancy style (from [email protected])

    git log --all --graph --decorate --oneline

3. Change the default commit editor

    git config --global core.editor `which vim`

4. Edit the last commit message

    git commit --amend

5. Commit case-sensitive only filename changes

    git config core.ignorecase false

6. Unmodifying a Modified File

    git checkout -- [path/filename]

7. List existing remotes

    git remote -v

8. Set new remote url

    git remote set-url origin [repo_url]

9. List all branch

    git branch -a

10. Change current branch

    git checkout [branch_name]

11. Merge branch

    git merge [branch_name]

12. Create temporarily workspace

    git stash
git stash list
git stash pop

13. Move to the specific commit

    git reset --hard [commit_hash]

14. Using submodule

    git submodule add url
git submodule init
git submodule update

15. Clone repo with submodule

    git clone --recursive [url]

Maitained by, Copy Rights @ CC BY-NC-SA 4.0