Results for “branch”
Small, practical examples. Search by task or narrow things down below.
Apply one commit from another branch
Git: Cherry-pick replays the selected change as a commit on the current branch.
Git✓ Tested
Branch on a command’s exit status
Linux Commands: Branch on a command’s exit status using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Branch on a threshold
Arduino / C: Branch on a threshold on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Branch on whether a pattern exists
Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.
Linux Commands✓ Tested
Check out another branch in a second working tree
Git: A linked worktree shares repository objects while maintaining a separate checked-out branch.
Git✓ Tested
Choose a branch with if and else
Choose a branch with if and else using a complete Go program with explicit sample inputs.
Go✓ Tested
Choose between two branches
Python: Use if and else to handle an available or empty stock count.
Python✓ Tested
Choose between two branches
C#: Use if and else to handle an available or empty stock count.
C#✓ Tested
Choose between two branches
Java: Use if and else to handle an available or empty stock count.
Java✓ Tested
Choose between two branches
JavaScript: Use if and else to handle an available or empty stock count.
JavaScript✓ Tested
Choose between two branches
TypeScript: Use if and else to handle an available or empty stock count.
TypeScript✓ Tested
Choose between two branches
C++: Use if and else to handle an available or empty stock count.
C++✓ Tested