Skip to content

Commit

Permalink
doc: how to temporarily disabled delta to get a patch from git diff
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelLarkin committed Jun 27, 2024
1 parent fc22e1b commit 5163d62
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
git update-ref -d refs/remotes/origin/gh-pages
```

## How to Delete a Remote Branch.
## How to Delete a Remote Branch

```sh
git push origin --delete dev/semantic_diff
```


## Realign a Branch with `origin`

When you want to make your branch `BRANCH` the same as `origin/BRANCH` no matter what.
Expand All @@ -24,6 +23,13 @@ git swith BRANCH
git reset --hard origin/BRANC
```

## Temporarily Disabled `delta` to Get a Patch

To get a patch out of `git diff`, by the command to `less` which changes the pager from `delta` to `less`.

```sh
git diff main -- .pre-commit-config.yaml | less
```

# GitHub

Expand All @@ -37,7 +43,6 @@ gh run list --status failure --user samuellarkin --json databaseId -q '.[].datab
| parallel --jobs 1 "gh api repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/runs/{} -X DELETE"
```


## Push an Approved PR's branch

Once a PR is approved, you can use the following command to merge your `dev/work` branch to `main` given that your branch is at the tip of `main`.
Expand Down

0 comments on commit 5163d62

Please sign in to comment.