Advanced Git
Submodules
Create a new submodule within your repository:
Clone a repository and initialize its submodules:
Update all the submodules in your repository to the latest commit of their respective branches:
Pull the latest changes from the remote repositories of the submodules and update them in your main repository:
Remove a submodule from your repository:
Cherry-picking
Cherry-picking allows you to apply a specific commit from one branch to another branch.
Reflog
Display the reflog, showing the history of HEAD and branch movements:
Find the hash of the lost commit or branch using the reflog and then checkout to that hash to restore it: