Say we come across a merge conflict when rebasing a feature branch onto main.
We can see the conflict with git diff.
Example output:
diff --cc config.txt
index 0e7703e,904fdf4..0000000
--- a/config.txt
+++ b/config.txt
| local minipick = require("mini.pick") | |
| local zoxide_picker = function() | |
| local zoxide_output = vim.fn.system('zoxide query -l') | |
| local zoxide_dirs = vim.split(zoxide_output, '\n', { trimempty = true }) | |
| -- open launcher to choose directory | |
| -- once a directory is selected, open a second launcher to select a file | |
| -- from directory using file picker | |
| minipick.start({ | |
| source = { |
Say we come across a merge conflict when rebasing a feature branch onto main.
We can see the conflict with git diff.
Example output:
diff --cc config.txt
index 0e7703e,904fdf4..0000000
--- a/config.txt
+++ b/config.txt
| #!/usr/bin/env bash | |
| # To run this script directly from this gist, run the following command. Make sure to replace | |
| # the arguments with your desired arguments. | |
| # | |
| # curl https://gist.githubusercontent.com/zmunk/2bc71b940d4a821b59ab073299de5f55/raw/create-lambda-layer.sh \ | |
| # | bash -s python3.11 schematichq pydantic pydantic_core schematic-py311-lambda-layer | |
| # Exit the script immediately if any command returns a non-zero (failure) exit code. | |
| set -e |
| # Piping into Nushell | |
| # Most of my workflow is in zsh, but I love using the tools provided by nushell. | |
| # I created the following wrapper for the `nu` command to allow me to pipe into nushell at any point. | |
| # For example, I can run any command in bash then pipe it to `nu` followed by any nu commands. | |
| # ``` | |
| # aws lambda list-functions --query 'Functions' | nu 'from json | select FunctionName' | |
| # ``` | |
| # usage: ls | nu 'lines' |
| import 'dart:convert'; | |
| void main() { | |
| final p = Product(name: 'gofret', price: '\$1.00', imgUrl: 'img.com'); | |
| print(p); | |
| print(p.runtimeType); | |
| print(""); | |
| final j = json.encode(p); |