Git Command lines practice for Branch Management

Project name: Test-Jekyll-MM-Gem-based.github.io Quoted from: Github Jekyll minimal-mistakes Overview This Jekyll project uses a branch management strategy that separates concerns into dedicated branches: theme Branch: Contains theme-related files (layouts, includes, assets, etc.). posts Branch: Contains content-related files (posts, pages, etc.). main Branch: The primary branch for merging and running the project. Branch Creation and Management # Create and switch to the 'theme' branch git checkout -b theme # Remove content directories from the 'theme' branch git rm -r _posts _pages README.md git commit -m "Remove content directories from theme branch" # Merge .gitignore from main into theme git merge main -- .gitignore git commit -m "Update .gitignore in theme branch" # Switch back to the main branch git checkout main # Create and switch to the 'posts' branch git checkout -b posts # Remove theme directories from the 'posts' branch git rm -r _layouts _includes assets Gemfile Gemfile.lock index.html git commit -m "Remove theme directories from posts branch" # Merge .gitignore from main into posts git merge main -- .gitignore git commit -m "Update .gitignore in posts branch" # Switch to the 'main' branch git checkout main # Merge the 'theme' branch into 'main' git merge theme # Resolve any conflicts, then stage and commit git add . git commit -m "Merge theme branch into main" # Merge the 'posts' branch into 'main' git merge posts # Resolve any conflicts, then stage and commit git add . git commit -m "Merge posts branch into main" # Push the 'main' branch to the remote repository named 'origin' git push origin main # Clean up generated directories and update .gitignore # Switch to the 'posts' branch git checkout posts rm -rf _site/ .sass-cache/ .jekyll-cache/ git add .gitignore git commit -m "Add .gitignore to posts branch" # Switch to the 'theme' branch git checkout theme rm -rf _site/ .sass-cache/ .jekyll-cache/ git add .gitignore git commit -m "Add .gitignore to theme branch" # Ensure .gitignore consistency across all branches git checkout theme git merge main -- .gitignore git commit -m "Update .gitignore in theme branch" git checkout posts git merge main -- .gitignore git commit -m "Update .gitignore in posts branch" # Check repository status, including ignored files git status --ignored # Remove generated directories from git tracking (if necessary) git rm -r --cached _site .sass-cache .jekyll-cache git commit -m "Remove generated directories from Git tracking" # Verify ignored status git status --ignored # Only execute the following commands in the 'main' branch jekyll build jekyll serve # force copy from theme branch when in main branch git merge -X theirs theme # force copy, another option git checkout theme -- multilple_file_name_with_space

2025-1-14 · 3 min · Atom.X

Generative AI Learning Path

Generative AI with Vertex AI: Prompt Design the official documentation on prompt design Task 1. Open the notebook in Vertex AI Workbench Task 2. Set up the notebook Task 3. Prompt engineering best practices Task 4. Reduce Output Variability Task 5. Improve Response Quality by Including Examples Why we should write code and documentation in Jupyter notebook ? Get Started with Vertex AI Studio Task 1. Analyze images with Gemini in Freeform mode Task 2. Explore multimodal capabilities Task 3. Design text prompts Task 4. Generate conversations Getting Started with the Gemini API in Vertex AI Task 1. Open the notebook in Vertex AI Workbench Task 2. Set up the notebook Task 3. Use the Gemini 1.5 Pro model Task 4. Generate text from a multimodal prompt Prompt Design in Vertex AI: Challenge Lab Task 1. Build a Gemini image analysis tool Task 2. Build a Gemini tagline generator Task 3. Experiment with image analysis code Task 4. Experiment with tagline generation code Freeform, chat, ...

2023-2-24 · 2 min · Atom.X

Customize Hugo site with theme PaperMod

Build Hugo site with theme PaperMod Special Functions and Extensions Math Typesetting Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries - KaTeX create the math partial file: touch layouts/partials/math.html add below content to math.html <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css"> <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js"></script> <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js" onload="renderMathInElement(document.body);"></script> <script> document.addEventListener("DOMContentLoaded", function() { renderMathInElement(document.body, { delimiters: [ {left: '$$', right: '$$', display: true}, {left: '$', right: '$', display: false}, {left: '\\(', right: '\\)', display: false}, {left: '\\[', right: '\\]', display: true} ], throwOnError : false }); }); </script> Customize the extend_head.html: cp themes/PaperMode/layouts/partials/extend_head.html layouts/partials/extend_head.html insert below content to extend_head.html {{ if or .Params.math .Site.Params.math }} {{ partial "math.html" . }} {{ end }} Enable math rendering by adding this to your config.yaml params: math: true # Enable math globally Config.yaml change TOC change the table of content on the right side colum of webpage, or in the middle top. ...

2023-2-5 · 2 min · Atom.X