Giter Club home page Giter Club logo

git-worktree's Introduction

Hi there ๐Ÿ‘‹

Full-stack developer with a passion for building things.

  • ๐Ÿ”ญ Iโ€™m currently working with React, Next, Node and GraphQL
  • ๐Ÿ“š Iโ€™m currently learning golang and CI/CD
  • ๐Ÿ’ฌ Ask me about anything related to Javascript
  • ๐Ÿ“ฌ How to reach me: @PhilStainer
  • โค VSCode, tRPC and Raycast

jim carrey typing gif

git-worktree's People

Contributors

philstainer avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

git-worktree's Issues

Make it clear on how to create an new worktree without a remote branch (new branch)

Hey, as I understand it, for now when creating a new worktree without tracking an existing branch, you need to :

  • Command Palette -> Worktree Add.
  • Set a name for the worktree.
  • When the prompt asks for a branch to track, press ESCAPE.
  • Then you'll have a new worktree with a new branch to push on the origin.

This is somewhat confusing. I would prefer to have a top level option in the branch list like "create new branch". What's your opinion ?

Can't clone repo on another drive

Hey, I'm trying to clone a repo on another disk than C:, and I'm getting this error:

---------------- Error Message ----------------

Error: EINVAL: invalid argument, mkdir 'C:\D:\Workspaces\my-repo'

The path should just be D:\Workspaces\my-repo. Any idea? Thanks!

Windows 10 @latest
VS Code @latest
Git @2.39.2
Git-Worktree @1.2.1

EDIT: I can't clone anything from the command palette, it always adds C:\ at the beginning of the path, even if the path already contains C:\, like: C:\C:\Workspaces\my-repo

Docker Integration

I wanted to move over to the git-worktree workflow but we use docker at our company. Does this plugin give a way to symlink a certain directory based on which worktree you are actively using?

We currently have our code in a structure like /projects/project-1/.git, /projects/project-2/.git, etc we map our docker containers to these directories so that the code is served from there. However I was wondering if the git-worktree plugin had the capabilities on switching worktrees to change this directory, for instance if I were to clone to /projects/src/project-1 could this project sym link the /projects/project-1 directory to be /projects/src/project-1/work-tree-in-use/?

Bug: unable to create a new worktree with the Add command

Hey Phil,

Today I sat down and tested the new version you published. Unfortunately I can't create a new worktree, I get this error:

---------------- Error Message ----------------

Error: command: 'git -C C:\.../worktree-1 push -u origin'. error: 'Command failed: git -C C:\.../worktree-1 push -u origin
fatal: The upstream branch of your current branch does not match
the name of your current branch.  To push to the upstream branch
on the remote, use

    git push origin HEAD:main

To push to the branch of the same name on the remote, use

    git push origin HEAD

To choose either option permanently, see push.default in 'git help config'.

To avoid automatically configuring an upstream branch when its name
won't match the local branch, see option 'simple' of branch.autoSetupMerge
in 'git help config'.

I selected main as my tracking branch, and I've got gitWorktree.worktree.shouldPushBranchAutomatically set to true.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.