Skip to main content

Overview

This guide covers the complete setup process for working with the Note knowledge base, including Obsidian configuration, Git settings, and tool optimization.
The repository uses Obsidian as the primary note-taking tool with Git for version control. Follow these steps to get your environment configured correctly.

Obsidian Setup

Obsidian is the primary tool for managing and editing notes in this knowledge base.
1

Install Obsidian Plugin

Install the Obsidian Custom Attachment Location plugin to manage image and asset paths.You can install it directly using this Obsidian URL:
obsidian://show-plugin?id=obsidian-custom-attachment-location
2

Configure Image Paths

Set the image storage path to be relative and store files in the ./assets directory.This ensures all images are organized in a consistent location relative to your notes.
Using relative paths for assets ensures the notes remain portable across different systems and Obsidian installations.

Typora Setup (Alternative Editor)

Typora can be used as an alternative markdown editor for this knowledge base.
1

Install Vue Theme

Set Typora to use the Vue theme for a consistent visual experience.
2

Configure Image Path

Set the image path pattern to match the Obsidian configuration:
./assets/${filename}
This ensures images saved in Typora follow the same organization as Obsidian.

Git Configuration

User Settings

Configure your Git identity for commits:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"

One-Command Push Alias

Create a Git alias for quick commits and pushes:
1

Create the Alias

Run this command to create the git pa alias:
git config --global alias.pa '!git add -A && git commit -m "Small Auto Commit" && git push'
2

Use the Alias

Now you can commit and push all changes with a single command:
git pa
The git pa alias commits all changes with a generic message. Use it only for quick personal updates. For collaborative work, write descriptive commit messages.

UTF-8 Encoding Configuration

To prevent encoding issues and display Chinese characters correctly in Git logs:
git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8
If you’re using Windows and experiencing encoding issues:1. Set console encoding to UTF-8:
chcp 65001
2. Use Git Bash or WSL: Git Bash and Windows Subsystem for Linux (WSL) have better UTF-8 support by default and typically avoid encoding issues.3. Configure console font: Ensure your terminal uses a UTF-8 compatible font like Consolas.4. Ensure text editor uses UTF-8: Make sure your text editor saves files in UTF-8 encoding, especially for commit messages.

Proxy Configuration (Windows)

If you’re using Clash or another proxy tool and Git clone/pull operations are slow or failing:
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
Replace 7890 with your actual proxy port if different. This setting is typically needed when using Clash on Windows.

Handling Windows File Name Issues

Windows doesn’t support certain characters in file names (like :, *, ?, etc.). If you encounter “unable to create file: Invalid argument” errors:
1

Option 1: Disable NTFS Protection

git config core.protectNTFS false
This may allow files with Windows-incompatible names to be created, which could cause issues.
2

Option 2: Rename Files (Recommended)

The recommended approach is to:
  1. Find the problematic files on GitHub/GitLab web interface
  2. Rename them to remove illegal characters
  3. Pull the repository again
This ensures compatibility across all platforms.
3

Option 3: Use Linux/WSL

Work with the repository in a Linux environment or WSL, which supports a wider range of file name characters.

GitHub Codespaces Configuration

If you’re using GitHub Codespaces to work with this repository:
1

Update Package Manager

Update apt packages to ensure you have the latest tools:
sudo apt update && sudo apt upgrade
2

Install System Information Tools

Install neofetch for system information display:
apt install neofetch

Verification

After completing the setup, verify your configuration:
git config --list | grep -E "user|i18n|proxy"

Troubleshooting

Solution: Configure proxy settings if you’re behind a firewall or using a VPN:
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
Adjust the port number based on your proxy configuration (common ports: 7890, 1080, 8080).
Solution: Configure UTF-8 encoding:
git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8
For Windows Command Prompt:
chcp 65001
Solution: This is a Windows file system limitation. Either:
  1. Rename the files on the web interface before pulling
  2. Use WSL or a Linux environment
  3. Set git config core.protectNTFS false (not recommended)
Solution: Verify your attachment path settings:
  1. Check that the Obsidian Custom Attachment Location plugin is installed
  2. Verify the attachment path is set to ./assets
  3. Ensure images are using relative paths
  4. Check that the assets directory exists in your vault

Next Steps

Explore Content

Start exploring the knowledge base topics

Interview Prep

Dive into interview preparation materials

Build docs developers (and LLMs) love