Created by CyanHall.com on 11/10/2020 , Last updated: 04/30/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 twitter@AntonioAnerao)

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

3. Change the default commit editor

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

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]
  

1. Stats of submission

    git shortlog -sne
  

3. Change the default commit editor

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

5. Commit case-sensitive only filename changes

    git config core.ignorecase false
  

7. List existing remotes

    git remote -v
  

9. List all branch

    git branch -a
  

11. Merge branch

    git merge [branch_name]
  

13. Move to the specific commit

    git reset --hard [commit_hash]
  

15. Clone repo with submodule

    git clone --recursive [url]
  

2. List log in fancy style (from twitter@AntonioAnerao)

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

4. Edit the last commit message

    git commit --amend
  

6. Unmodifying a Modified File

    git checkout -- [path/filename]
  

8. Set new remote url

    git remote set-url origin [repo_url]
  

10. Change current branch

    git checkout [branch_name]
  

12. Create temporarily workspace

    git stash
git stash list
git stash pop
  

14. Using submodule

    git submodule add url
git submodule init
git submodule update
  


Maitained byΒ Cyanhall.com, Copy Rights @ CC BY-NC-SA 4.0