diff --git a/git.md b/git.md index 23a35a7..7102050 100644 --- a/git.md +++ b/git.md @@ -2,10 +2,13 @@ ## Table of contents +<<<<<<< HEAD - [glossary](#glossary) +- [terminology](#terminology) - [branches](#branches) - [create a branch](#create-a-branch) - [submodules](#submodules) +- [removing files from index](#removing-files-from-index) - [philosophies](#philosophies) - [merge](#merge) - [rebase](#rebase) @@ -38,7 +41,7 @@ git switch ## submodules To fetch submodules of a cloned repository use: -```bash +```sh # do it manually git submodule init git submodule update @@ -51,6 +54,15 @@ git submodule update --init --recursive ``` +## removing files from index + +To remove files from index without deleting them on disk, use: +```sh +git rm --cached +``` +This is helpful if one accidentally committed autogenerated files. + + ## philosophies Important things to always remember: @@ -80,3 +92,5 @@ git rebase # proceeds after solving rebase conflict git rebase --continue ``` + +