Version Control [GIT]

Git is a version control system first developed by Linus Torvalds. It facilitates collaboration on large projects, keeps track of changes, and allows mistakes to be rolled back into a previous state. Configure Git Git uses a hierarchy of configuration files: System: (/etc/gitconfig) Configuration for all users in a system. Global: (~/.gitconfig) Configure Git for all project of the current user. Local: (.git/config) Configure Git for the current project. Worktree: (.git/config.worktree) Configure part of a project. # Check if user name and email are set. git config --get user.name git config --get user.email # If not, set those values. git config --add --global user.name "username" git config --add --global user.email "email@example.com" git config --add --global init.defaultBranch main # GitHub's default git config --unset example.key # Remove a configuration value git config --unset-all example.key # Remove all instances of a configuration key git config --remove-section section # Remove an entire section # Rebase on pull by default to keep a linear history git config --global pull.rebase true Create a Repository Git stores all project information in the .git directory. This includes branches, commits, and metadata. ...

10 min · 2093 words · TrudeEH

WSL2

Windows’ WSL allows for installing a Linux subsystem on a Windows host. WSL2 enhances WSL with support for launching GUI apps as if they were regular Windows programs (or any X.org window). Install WSL2 On recent WSL versions, this process is quite simple: wsl --list --online # See available distros wsl --install -d <distro> # Select & Install distro wsl --set-default-version 2 # Set WSL 2 as the default version If the previous steps fail, WSL can still be installed manually: ...

3 min · 484 words · TrudeEH