### Install Gitolite and Setup Admin Repository Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html These commands clone the Gitolite repository, install it, and set up the administrative repository using a public SSH key. Ensure $HOME/bin exists and is in your PATH. ```bash $ git clone git://github.com/sitaramc/gitolite $ gitolite/install -ln # assumes $HOME/bin exists and is in your $PATH $ gitolite setup -pk $HOME/scott.pub ``` -------------------------------- ### Install Python Setuptools Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs the Python setuptools package required by Gitosis on Ubuntu. ```bash $ apt-get install python-setuptools ``` -------------------------------- ### Run Examples Locally Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/README.md Commands to run the SolidJS and React examples locally from the repository root. ```bash bun run example:dev bun run example-react:dev ``` -------------------------------- ### Clone and Install Gitosis Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Clones the Gitosis repository and installs it using setup.py. ```bash $ git clone https://github.com/tv42/gitosis.git $ cd gitosis $ sudo python setup.py install ``` -------------------------------- ### Install solid-markdown-wasm Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/README.md Install the solid-markdown-wasm package using npm or bun. ```bash npm install solid-markdown-wasm ``` ```bash bun add solid-markdown-wasm ``` -------------------------------- ### Install Gitolite Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Commands to clone Gitolite, install it, and set up the admin repository. Assumes $HOME/bin exists and is in your $PATH. ```bash git clone git://github.com/sitaramc/gitolite gitolite/install -ln # assumes $HOME/bin exists and is in your $PATH gitolite setup -pk $HOME/scott.pub ``` -------------------------------- ### Install Ruby and Gem on Windows Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs Ruby and related tools from the RubyInstaller website. ```bash $ gem install rdiscount ``` -------------------------------- ### Install Dependencies and Make Ebooks on Fedora Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs necessary Ruby and Calibre packages and then generates ebooks in Markdown. ```bash $ yum install ruby calibre rubygems ruby-devel rubygem-ruby-debug rubygem-rdiscount $ makeebooks en # will produce a mobi ``` -------------------------------- ### Compile and Install Git from Source Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Compiles and installs Git version 1.7.2.2 from its source tarball to the /usr/local directory. ```bash tar -zxf git-1.7.2.2.tar.gz cd git-1.7.2.2 make prefix=/usr/local all sudo make prefix=/usr/local install ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/example/README.md Installs project dependencies using npm, pnpm, or yarn. Ensure you have one of these package managers installed. ```bash $ npm install # or pnpm install or yarn install ``` -------------------------------- ### Example post-update Hook Script Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Displays the content of an example post-update hook script used to prepare a packed repository for dumb transports. ```bash $ cat .git/hooks/post-update #!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". # ``` -------------------------------- ### Install Git on Fedora Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs Git using the yum package manager on Fedora. ```bash yum install git ``` -------------------------------- ### Multiple Remotes Example Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Illustrates a scenario with multiple remote repositories configured for a project, showing their shortnames and URLs. ```bash git remote -v bakkdoor git://github.com/bakkdoor/grit.git cho45 git://github.com/cho45/grit.git defunkt git://github.com/defunkt/grit.git koke git://github.com/koke/grit.git origin git@github.com:mojombo/grit.git ``` -------------------------------- ### Start GitWeb Instance with WEBrick Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Starts a temporary GitWeb instance using the WEBrick HTTP server and automatically opens a web browser. ```bash $ git instaweb --httpd=webrick [2009-02-21 10:02:21] INFO WEBrick 1.3.1 [2009-02-21 10:02:21] INFO ruby 1.8.6 (2008-03-03) [universal-darwin9.0] ``` -------------------------------- ### Install Vite WASM Plugin Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/README.md Install the vite-plugin-wasm for handling WebAssembly binaries. ```bash npm install -D vite-plugin-wasm ``` ```bash bun add -d vite-plugin-wasm ``` -------------------------------- ### Install Gem and Make Ebooks on MacOS Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs the rdiscount gem and then generates ebooks in Markdown. ```bash $ gem install rdiscount $ makeebooks zh #will produce a mobi ``` -------------------------------- ### Install Git on Mac with MacPorts Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs Git along with Subversion, documentation, and bash completion support using MacPorts. ```bash sudo port install git +svn +doc +bash_completion +gitweb ``` -------------------------------- ### Install Git on Mac with Homebrew Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs Git using the Homebrew package manager on macOS. ```bash brew install git ``` -------------------------------- ### Install Git on Debian/Ubuntu Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs Git using the apt-get package manager on Debian-based distributions like Ubuntu. ```bash apt-get install git ``` -------------------------------- ### Install Git Dependencies on Debian/Ubuntu Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs necessary development libraries for compiling Git on Debian-based systems using apt-get. ```bash apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \ libz-dev libssl-dev ``` -------------------------------- ### Start Git Daemon Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md This command starts the Git daemon with options to reuse addresses and specify a base path for repositories. It's essential for enabling Git protocol access. ```bash git daemon --reuseaddr --base-path=/opt/git/ /opt/git/ ``` -------------------------------- ### Gitolite Access Rights Report Example Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html This is an example output from Gitolite showing repository access rights for a user. It lists repositories and the permissions (Read, Write) granted. ```text hello scott, this is git@git running gitolite3 v3.01-18-g9609868 on git 1.7.4.4 R anu-wsd R entrans R W git-notes R W gitolite R W gitolite-admin R indic_web_input R shreelipi_converter ``` -------------------------------- ### Start Git Daemon Service Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md This command manually starts the Git daemon service using initctl, useful for applying changes without rebooting. ```bash initctl start local-git-daemon ``` -------------------------------- ### Build Project with Bun Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/README.md Run this command to compile the project from source using Bun. Ensure you have Rust, wasm-pack, and NodeJS/Bun installed. ```bash bun run build ``` -------------------------------- ### Bash Auto-Completion Example (Commands) Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Demonstrates how Git auto-completion suggests commands when typing partial input and pressing Tab. ```bash $ git co ``` -------------------------------- ### Initiating Upload Pack via SSH Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Example of how a fetch-pack process initiates the upload-pack process on the remote side via SSH. ```bash $ ssh -x git@github.com "git-upload-pack 'schacon/simplegit-progit.git'" ``` -------------------------------- ### Inspect Remote Details (Example 1) Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md An example output of `git remote show origin`, illustrating URL and basic tracking information for the master branch. ```git * remote origin URL: git://github.com/schacon/ticgit.git Remote branch merged with 'git pull' while on branch master master Tracked remote branches master ticgit ``` -------------------------------- ### Interactive Rebase Script Example Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md An example of the script presented by Git during an interactive rebase. It lists commits and available commands for manipulation. ```gitconfig pick f7f3f6d changed my name a bit pick 310154e updated README formatting and added blame pick a5f4a0d added cat-file # Rebase 710f0f8..a5f4a0d onto 710f0f8 # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted. # # Note that empty commits are commented out ``` -------------------------------- ### Bash Auto-Completion Example (Options) Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Shows how Git auto-completion can suggest options for commands like `git log` when typing partial input and pressing Tab. ```bash $ git log --s ``` -------------------------------- ### Basic .gitignore Example Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Use this to ignore object and archive files, as well as temporary editor files. ```gitignore *.[oa] *~ ``` -------------------------------- ### Gitolite Access Rights Reporting Example Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md This example demonstrates the output of Gitolite's access rights reporting feature when a user logs in via SSH. It lists repositories and the access levels granted to the user. ```text hello scott, this is git@git running gitolite3 v3.01-18-g9609868 on git 1.7.4.4 R anu-wsd R entrans R W git-notes R W gitolite R W gitolite-admin R indic_web_input R shreelipi_converter ``` -------------------------------- ### Example Git fast-import Output Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Illustrates the expected output format when importing files using a Ruby script and git fast-import. ```git-fast-import $ ruby import.rb /opt/import_from commit refs/heads/master mark :1 committer Scott Chacon 1230883200 -0700 data 29 imported from back_2009_01_02deleteall M 644 inline file.rb data 12 version two commit refs/heads/master mark :2 committer Scott Chacon 1231056000 -0700 data 29 imported from back_2009_01_04from :1 deleteall M 644 inline file.rb data 14 version three M 644 inline new.rb data 16 new version one (...) ``` -------------------------------- ### Run Development Server Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/example/README.md Starts the application in development mode, typically on http://localhost:3000. The server will automatically reload on file edits. ```bash npm run dev # or npm start ``` -------------------------------- ### Start Tracking a New File Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Use 'git add' with a file path to begin tracking a new file. This stages the file for the next commit. ```bash $ git add README ``` -------------------------------- ### Inspect Remote Details (Example 2) Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md A more detailed example output of `git remote show origin`, showing multiple tracking branches, new remote branches, stale branches, and local branches pushed to the remote. ```git * remote origin URL: git@github.com:defunkt/github.git Remote branch merged with 'git pull' while on branch issues issues Remote branch merged with 'git pull' while on branch master master New remote branches (next fetch will store in remotes/origin) caching Stale tracking branches (use 'git remote prune') libwalker walker2 Tracked remote branches acl apiv2 dashboard2 issues master postgres Local branch pushed with 'git push' master:master ``` -------------------------------- ### Git Fetch-Pack Object Negotiation Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Example of a fetch-pack process negotiating objects with upload-pack, specifying desired and available SHAs. ```text 0054want ca82a6dff817ec66f44342007202690a93763949 ofs-delta 0032have 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7 0000 0009done ``` -------------------------------- ### Example Post-Update Hook Script Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md This script, when executed as a post-update hook, updates server information necessary for HTTP fetching. ```bash #!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". # exec git-update-server-info ``` -------------------------------- ### Initializing a Git Repository and Importing Data Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Demonstrates the process of initializing a new Git repository and piping the output of an import script into 'git fast-import'. ```bash $ git init Initialized empty Git repository in /opt/import_to/.git/ $ ruby import.rb /opt/import_from | git fast-import ``` -------------------------------- ### Initialize a Bare Git Repository Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Steps to create and initialize an empty bare Git repository on the server. Bare repositories do not have a working directory. ```bash cd /opt/git mkdir project.git cd project.git git --bare init ``` -------------------------------- ### Staging and Committing Files Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Stages files and creates an initial commit. This is a fundamental operation for starting a Git repository. ```bash $ git add README test.rb LICENSE $ git commit -m 'initial commit of my project' ``` -------------------------------- ### Pre-commit Hook Example Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Illustrates the purpose of the pre-commit hook, which runs before a commit message is entered and can be used to inspect the snapshot. ```bash git commit --no-verify ``` -------------------------------- ### Clone a sample Git project Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Clone the `simplegit` project for demonstration purposes. ```bash git clone git://github.com/schacon/simplegit-progit.git ``` -------------------------------- ### Create and Switch to a New Branch Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Use this command to create a new branch and immediately switch to it for starting new work. ```bash $ git checkout -b iss53 Switched to a new branch 'iss53' ``` -------------------------------- ### Create and Commit to a New Feature Branch Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Jessica starts working on a new feature by creating a branch and making initial commits. ```bash $ git checkout -b featureA Switched to a new branch "featureA" $ vim lib/simplegit.rb $ git commit -am 'add limit to log function' [featureA 3300904] add limit to log function 1 files changed, 1 insertions(+), 1 deletions(-) ``` -------------------------------- ### Display Git Configuration Help Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Use this command to view all available Git configuration options and their descriptions. It's useful for understanding the full range of customizable settings. ```bash $ git config --help ``` -------------------------------- ### Initialize a Shared Bare Repository on Server Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md After copying the bare repository to the server, initialize it with `--shared` to ensure proper group write permissions for collaborators. ```bash ssh user@git.example.com cd /opt/git/my_project.git git init --bare --shared ``` -------------------------------- ### Track and Commit Files Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Begin version-controlling existing files by adding them to the staging area and then committing them. This sets up the initial version of your project in Git. ```bash git add *.c git add README git commit -m 'initial project version' ``` -------------------------------- ### Initialize a New Git Project Locally Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Use these commands to initialize a new Git repository in your local project directory before pushing it to GitHub. ```bash $ git init $ git add . $ git commit -m 'initial commit' ``` -------------------------------- ### Set Ebook Format and Make Ebooks on Windows Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Sets the ebook format to EPUB and then generates ebooks. ```bash $ SET FORMAT=epub then $ ruby makeebooks vi #will produce an epub ``` -------------------------------- ### Install Git Dependencies on Fedora Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Installs necessary development libraries for compiling Git on Fedora systems using yum. ```bash yum install curl-devel expat-devel gettext-devel \ openssl-devel zlib-devel perl-devel asciidoc xmlto ``` -------------------------------- ### Add Files and Commit for Initial Version Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Track existing files in the repository and create the initial commit. Use 'git add' to specify files and 'git commit' to record the changes. ```bash $ git add *.c $ git add README $ git commit -m 'initial project version' ``` -------------------------------- ### Set Calibre Path and Make Ebooks on Windows Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Sets the ebook conversion tool path and generates ebooks in Markdown. ```bash $ SET ebook_convert_path=c:\Program Files\Calibre2\ebook-convert.exe $ ruby makeebooks vi #will produce a mobi ``` -------------------------------- ### Create a Bare Git Repository Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Use the `git clone --bare` command to create a bare repository, which lacks a working directory. This is the first step in setting up a Git server. ```bash $ git clone --bare my_project my_project.git Cloning into bare repository 'my_project.git'... done. ``` -------------------------------- ### Packed References Example Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html An example of how Git stores references in the packed-refs file for performance. This format lists SHA-1 hashes and their corresponding reference paths. ```git 52d771167707552d8e2a50f602c669e2ad135722 refs/tags/v1.0.1 ``` -------------------------------- ### Example Commit Message Template Content Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html This is an example of the content that can be placed in a commit message template file. It includes placeholders for a subject line, description, and ticket number. ```text subject line what happened [ticket: X] ``` -------------------------------- ### Start Temporary GitWeb Instance Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Use `git instaweb` to quickly launch a temporary GitWeb instance for local visualization. Specify the HTTPD handler if not using the default. ```bash $ git instaweb --httpd=webrick ``` -------------------------------- ### Example mbox Patch Header Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html This is an example of the header format found in an mbox file, typically generated by 'git format-patch'. It includes author, date, and subject information. ```git From 330090432754092d704da8e76ca5c05c198e71a8 Mon Sep 17 00:00:00 2001 From: Jessica Smith Date: Sun, 6 Apr 2008 10:17:23 -0700 Subject: [PATCH 1/2] add limit to log function Limit log functionality to the first 20 ``` -------------------------------- ### Build for Production Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/example/README.md Builds the application for production, optimizing it for performance and creating minified files in the `dist` folder. This script is ready for deployment. ```bash npm run build ``` -------------------------------- ### Starting Git Daemon Service Manually Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html This command manually starts the Git daemon service configured via an Upstart script, without requiring a system reboot. ```bash initctl start local-git-daemon ``` -------------------------------- ### Example of Resolved Conflict Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html After manually editing a conflicted file, replace the conflict markers and choose the desired content. This example shows a resolved section combining parts from both branches. ```text please contact us at email.support@github.com ``` -------------------------------- ### Initialize Gitosis with Public Key Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Initializes Gitosis using the git user and a provided public key. This creates the gitosis-admin repository. ```bash $ sudo -H -u git gitosis-init < /tmp/id_dsa.pub ``` -------------------------------- ### Bun Dependency Installation Security Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/SECURITY.md Configure Bun's `minimumReleaseAge` to prevent the installation of newly published malicious packages. This TOML snippet sets a 7-day minimum release age for packages and specifies exceptions. ```toml [install] # Only install package versions published at least 7 days ago minimumReleaseAge = 604800 # Packages that bypass the age requirement minimumReleaseAgeExcludes = ["@types/bun", "typescript"] ``` -------------------------------- ### Upstart Script for Git Daemon on Ubuntu Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md This Upstart script configures the Git daemon to start on system startup and respawn if it fails. It specifies the user, group, and paths for the daemon. ```bash start on startup stop on shutdown exec /usr/bin/git daemon \ --user=git --group=git \ --reuseaddr \ --base-path=/opt/git/ \ /opt/git/ respawn ``` -------------------------------- ### List All Git Settings Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Use this command to display all Git configuration settings that Git can find. Settings may appear multiple times if defined in different configuration files. ```bash git config --list ``` -------------------------------- ### Example Git Diff Output for Image Files Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md This is an example of how 'git diff' output might look after configuring the exiftool diff driver for PNG files, showing changes in metadata like file size and dimensions. ```diff diff --git a/image.png b/image.png index 88839c4..4afcb7c 100644 --- a/image.png +++ b/image.png @@ -1,12 +1,12 @@ ExifTool Version Number : 7.74 -File Size : 70 kB -File Modification Date/Time : 2009:04:17 10:12:35-07:00 +File Size : 94 kB +File Modification Date/Time : 2009:04:21 07:02:43-07:00 File Type : PNG MIME Type : image/png -Image Width : 1058 -Image Height : 889 +Image Width : 1056 +Image Height : 827 Bit Depth : 8 Color Type : RGB with Alpha ``` -------------------------------- ### Initialize and Update Submodules Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Initializes the local submodule configuration and then fetches the submodule's data and checks out the correct commit. ```bash git submodule init git submodule update ``` -------------------------------- ### Start Binary Search with Git Bisect Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Initiate a binary search through commit history to find the commit that introduced an issue. Use `git bisect start`, `git bisect bad`, and `git bisect good [good_commit]` to define the search range. ```bash $ git bisect start $ git bisect bad $ git bisect good v1.0 Bisecting: 6 revisions left to test after this [ecb6e1bc347ccecc5f9350d878ce677feb13d3b2] error handling on repo ``` -------------------------------- ### Ref-Level Access Control with Regex Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Applies specific permissions based on branch or tag names using regular expressions (refexes). Interns can push to 'int' branch, engineers to branches starting with 'eng-' or tags starting with 'rc[0-9]', and admins have full control. ```gitolite repo @oss_repos RW int$ = @interns RW eng- = @engineers RW refs/tags/rc[0-9] = @engineers RW+ = @admins ``` -------------------------------- ### Initialize Git Repository and Verify Objects Directory Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Initializes a new Git repository and checks the contents of the objects directory to confirm it's empty. ```bash mkdir test cd test git init find .git/objects ``` -------------------------------- ### Setting up HTTP/S for Git Read Access Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html This snippet demonstrates the steps to configure a bare Git repository for read-only access over HTTP/S. It involves cloning the repository, moving a sample hook file, and making it executable. ```bash $ cd /var/www/htdocs/ $ git clone --bare /path/to/git_project gitproject.git $ cd gitproject.git $ mv hooks/post-update.sample hooks/post-update $ chmod a+x hooks/post-update ``` -------------------------------- ### Math Block Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md0.md Example of a math block for displaying mathematical expressions. ```math x = 3 y = 2 ``` -------------------------------- ### Upstart Script for Git Daemon on Ubuntu Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html This Upstart script configures the Git daemon to start on system startup and stop on shutdown. It specifies the user, group, and paths for the daemon, and ensures it respawns if it fails. ```bash start on startup stop on shutdown exec /usr/bin/git daemon \ --user=git --group=git \ --reuseaddr \ --base-path=/opt/git/ \ /opt/git/ respawn ``` -------------------------------- ### JavaScript Code Block Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md0.md Example of a simple JavaScript code block. ```javascript let message = 'Hello world'; alert(message); ``` -------------------------------- ### Check Pandoc Version Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Checks the installed Pandoc version to ensure it meets the minimum requirement. ```bash pandoc -v ``` -------------------------------- ### Initialize a New Git Repository Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Create a new Git repository in the current directory. This command generates a .git subdirectory containing the repository's essential files. ```bash $ git init ``` -------------------------------- ### C++ Code Block Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md0.md Example of a C++ code block demonstrating vector usage and iteration. ```cpp #include #include auto main() -> int { std::vector v = {8, 4, 5, 9}; v.emplace_back(6); v.emplace_back(9); v[2] = -1; for (int n : v) std::cout << n << ' '; std::cout << '\n'; } ``` -------------------------------- ### SVN Commit with Git-SVN Metadata Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Example of a commit message from a Subversion import showing the git-svn-id metadata. ```git commit 37efa680e8473b615de980fa935944215428a35a Author: schacon Date: Sun May 3 00:12:22 2009 +0000 fixed install - go to trunk git-svn-id: https://my-project.googlecode.com/svn/trunk@94 4c93b258-373f-11de- be05-5f7a86268029 ``` -------------------------------- ### Enable and Make Post-Update Hook Executable Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Navigate to your project's directory and enable the post-update hook by renaming the sample file and setting execute permissions. ```bash cd project.git mv hooks/post-update.sample hooks/post-update chmod a+x hooks/post-update ``` -------------------------------- ### Reordered Commits Script Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Example of a rebase script after reordering commits. Commits not listed will be removed. ```git rebase pick 310154e updated README formatting and added blame pick f7f3f6d changed my name a bit ``` -------------------------------- ### Packed References File Content Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Example content of the .git/packed-refs file, which consolidates repository references for efficiency. ```git # pack-refs with: peeled cac0cab538b970a37ea1e769cbbde608743bc96d refs/heads/experiment ab1afef80fac8e34258ff41fc1b867c702daa24b refs/heads/master cac0cab538b970a37ea1e769cbbde608743bc96d refs/tags/v1.0 9585191f37f7b0fb9444f35a9bf50de191beadc2 refs/tags/v1.1 ^1a410efbd13591db07496601ebc7a059dd55cfe9 ``` -------------------------------- ### Clone Repository Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Initializes an empty Git repository on the local machine by cloning from a remote server. ```bash $ git clone john@githost:simplegit.git Initialized empty Git repository in /home/john/simplegit/.git/ ... $ cd simplegit/ ``` ```bash $ git clone jessica@githost:simplegit.git Initialized empty Git repository in /home/jessica/simplegit/.git/ ... $ cd simplegit/ ``` -------------------------------- ### Clone Repository Over HTTP Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Example command to clone a Git repository that has been made accessible via HTTP. ```bash git clone http://example.com/gitproject.git ``` -------------------------------- ### Set Global User Name Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Configures the global Git user name. This is a one-time setup for your system. ```bash git config --global user.name "John Doe" ``` -------------------------------- ### Alternative: Copying Project Files Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html An alternative method to create a bare repository by copying the project's .git directory. This is functionally similar to 'git clone --bare'. ```bash $ cp -Rf my_project/.git my_project.git ``` -------------------------------- ### Run Git Diff Command Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html Example of running a Git diff command to compare two specific commits. ```bash $ git diff 32d1776b1^ 32d1776b1 ``` -------------------------------- ### Initialize a New Git Repository Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Create a new Git repository in an existing directory. This command generates a .git subdirectory containing the repository's essential files. No files are tracked initially. ```bash git init ``` -------------------------------- ### Delete Git Branch Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Forcefully deletes a branch. This is used in the example to simulate a scenario where the reflog might be lost. ```bash git branch -D recover-branch ``` -------------------------------- ### Build and Install GitWeb CGI Script Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Clone the Git source code, build the GitWeb CGI script, and copy it to the web server's directory. Ensure `GITWEB_PROJECTROOT` is set correctly to your repository path. ```bash $ git clone git://git.kernel.org/pub/scm/git/git.git $ cd git/ $ make GITWEB_PROJECTROOT="/opt/git" \ prefix=/usr gitweb $ sudo cp -Rf gitweb /var/www/ ``` -------------------------------- ### SSH Login Rejection with git-shell Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Example output when a user attempts to SSH into the server with a restricted 'git-shell' login. ```bash ssh git@gitserver fatal: What do you think I am? A shell? Connection to gitserver closed. ``` -------------------------------- ### Create Branch and Switch Separately Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html This is a two-step alternative to creating and switching to a new branch. ```bash $ git branch iss53 $ git checkout iss53 ``` -------------------------------- ### Showing Configured Remotes Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Displays the shortnames of all configured remote repositories. Use '-v' to show the URLs associated with each remote. ```bash git remote ``` ```bash git remote -v ``` -------------------------------- ### C++ Code Block Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md0.html Shows a C++ code block with standard library usage. Suitable for C++ examples. ```cpp #include #include auto main() -> int { std::vector v = {8, 4, 5, 9}; v.emplace_back(6); v.emplace_back(9); v[2] = -1; for (int n : v) std::cout << n << ' '; std::cout << '\n'; } ``` -------------------------------- ### Mermaid Sequence Diagram Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/packages/example-shared/src/assets/markdown_preview.md Example of a Mermaid sequence diagram. Ensure Mermaid rendering is enabled in your Markdown processor. ```mermaid sequenceDiagram participant Client participant Server participant Database Client->>Server: Request data Server->>Database: Query Database-->>Server: Results Server-->>Client: Response ``` -------------------------------- ### Initializing and Updating Submodules Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/test-data/md1.html After cloning a project with submodules, run 'git submodule init' to register the submodule in your local configuration, followed by 'git submodule update' to fetch and checkout the submodule's content. ```bash $ git submodule init Submodule 'rack' (git://github.com/chneukirchen/rack.git) registered for path 'rack' $ git submodule update Initialized empty Git repository in /opt/myproject/rack/.git/ remote: Counting objects: 3181, done. remote: Compressing objects: 100% (1534/1534), done. remote: Total 3181 (delta 1951), reused 2623 (delta 1603) Receiving objects: 100% (3181/3181), 675.42 KiB | 173 KiB/s, done. Resolving deltas: 100% (1951/1951), done. Submodule path 'rack': checked out '08d709f78b8c5b0fbeb7821e37fa53e69afcf433' ``` -------------------------------- ### Set Global User Email Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Configures the global Git user email address. This is a one-time setup for your system. ```bash git config --global user.email johndoe@example.com ``` -------------------------------- ### View Git Log Source: https://github.com/zeon256/solid-markdown-wasm/blob/main/markdown-renderer/sample-data/md1.md Displays the commit history in a one-line format. Useful for getting an overview of repository changes. ```bash git log --pretty=oneline ab1afef80fac8e34258ff41fc1b867c702daa24b modified repo a bit 484a59275031909e19aadb7c92262719cfcdf19a added repo.rb 1a410efbd13591db07496601ebc7a059dd55cfe9 third commit cac0cab538b970a37ea1e769cbbde608743bc96d second commit fdf4fc3344e67ab068f836878b6c4951e3b15f3d first commit ```