Skip to main content

4 posts tagged with "guide"

View All Tags

Setup and Use Git Worktree

Clone a repo with worktrees setup from the start:

mkdir <repo-name>
cd <repo-name>
git clone --bare --filter=blob:none <git-url>
cd <repo-name>.git

Some options to help your sanity:

# always prune on fetch
git config fetch.prune true
# allow `git fetch origin <branch-name>` to work as expected (create a remote ref)
git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'

To create a new branch:

git worktree add ../<branch-name>
cd ../<branch-name>

To copy a remote branch (note that this will only work with the above fetch config set):

git fetch origin <branch-name>
git worktree add ../<branch-name>
cd ../<branch-name>

To create a new branch based on a remote branch:

git worktree add ../<branch-name> -b <branch-name> --no-track origin/dev
cd ../<branch-name>

How GraphQL Works

This is intended to be a very basic high level overview of GraphQL, explained to a developer that already understands the basics of REST API design. This is not a deep dive into all GraphQL's features or a GraphQL pros/cons list. Also, while GraphQL is backend language agnostic, this guide will be mentioning JavaScript implementations (since that's what I work with).