FIND YOUR NEXT FEW LINES

Results for “Git”

Small, practical examples. Search by task or narrow things down below.

155 snippets foundClear filters
GitRemotes & collaboration

Fetch a remote branch

Refresh remote-tracking references before reviewing changes.

fetch✓ Tested
GitCommits & history

Find commits by message

Search commit subjects and bodies for a phrase.

log✓ Tested
GitCommits & history

Find the commit responsible for a line

Inspect line attribution in a stable machine-readable format.

blame✓ Tested
JavaNumbers & dates

Format a decimal number

Format a Java decimal with two digits and a fixed locale.

Java✓ Tested
CNumbers & memory

Format a decimal value

Print two fractional digits with C printf.

C✓ Tested
CBinary formats & structured parsing

Format a nonnegative integer amount as whole and fractional units

C: Keep the calculation in integer minor units and use two digits for the remainder.

C✓ Tested
Arduino / CGetting Started

Give an LED pin a constant name

Arduino / C: Use const to name the built-in LED pin and reuse it in output instructions.

Arduino / C✓ Tested
GitWorking tree & staging

List changed files without the full diff

Inspect affected paths before staging.

diff✓ Tested
GitBranches & recovery

List local branches

Print branch names in sorted order.

branch✓ Tested
GitBranches & recovery

Merge a branch only by fast-forward

Refuse to create an unexpected merge commit.

merge✓ Tested
C++Numeric parsing & calculations

Parse a hexadecimal integer with from_chars

C++: An explicit radix controls digit interpretation without a locale dependency.

C++✓ Tested
Linux CommandsSearching text

Print only the matching portions

Linux Commands: Use extended regex and -o to extract digit sequences.

Linux Commands✓ Tested