# Insert Code from Git 📝 Embed non‑markdown files such as code, config, markup, or plain text from your repositories. ![Code from Github into Confluence](https://help.gocapable.com/images/9395b928-e6ad-4dc0-b78f-f404077b8b58.webp) ### [#](#before-you-start)Before you start * Connect your Git account and ensure access to the target repo/branch. ### [#](#examples-of-supported-file-types)Examples of supported file types * Code: `.js`, `.ts`, `.tsx`, `.py`, `.java`, `.c`, `.cpp`, `.cs`, `.go`, `.rs`, `.rb`, `.php`, `.swift`, `.kt`, `.scala`, `.sh`, `.bash`, `.zsh`, `.sql`, `.r`, `.m`, `.pl`, `.lua`, `.dart`, `.vue` * Config/Data: `.json`, `.yaml`, `.yml`, `.toml`, `.ini`, `.cfg`, `.conf`, `.env` * Markup/Styles: `.html`, `.htm`, `.xml`, `.svg`, `.css`, `.scss`, `.sass`, `.less` * Plain text: files without a known extension are shown as text when possible Not supported for inline preview (you can still reference them): `.pdf`, `.doc(x)`, `.xls(x)`, `.ppt(x)`, archives like `.zip`, `.tar`, `.gz`, `.bz2`, `.7z`, `.rar`, executables/installers like `.exe`, `.dll`, `.dmg`, `.pkg`, `.iso`, and `.wasm`. ### [#](#insert-steps)Insert steps 1. Insert the Github File Macro ![Insert Code from Github into Confluence](https://help.gocapable.com/images/16d62158-af74-4da2-943f-9cd3155ebc84.webp) 1. Connect/select your account and pick the repository and branch. ![Configure Code from Github into Confluence](https://help.gocapable.com/images/d6fa5252-496c-4122-b3b5-d7bc2b825efa.webp) 1. Browse to the file and select it, or paste it’s URL in the input ![Insert code from Github to Confluence](https://help.gocapable.com/images/70a23c3a-3ebd-45d0-bab8-54c77a91bbaa.webp) 1. (Optional) Set the title and toggle any available display options (e.g., line numbers where applicable). 2. Insert to embed the file. ![Code from Github to Confluence](https://help.gocapable.com/images/9395b928-e6ad-4dc0-b78f-f404077b8b58.webp) ### [#](#how-it-renders)How it renders * Recognized languages are syntax-highlighted for readability. * Large files or very long lines may be truncated for performance. ### [#](#permissions)Permissions * Viewers need their own access to the repository to see the embedded content. ### [#](#troubleshooting)Troubleshooting * File doesn’t preview: Verify the extension is supported for inline view or download/reference it instead. * Missing file: Confirm branch selection and path accuracy.