All Projects → hangxingliu → Wslgit

hangxingliu / Wslgit

Licence: gpl-3.0
🍬 Use Git installed in WSL(Windows Subsystem for Linux) from Windows and Visual Studio Code

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Wslgit

Wslgit
Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
Stars: ✭ 903 (+540.43%)
Mutual labels:  wsl, vscode
Vscode Remote Release
Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
Stars: ✭ 2,256 (+1500%)
Mutual labels:  wsl, vscode
Leek Fund
📈 韭菜盒子——VSCode 里也可以看股票 & 基金实时数据,做最好用的投资插件 🐥
Stars: ✭ 2,164 (+1434.75%)
Mutual labels:  vscode
Vscode Mjml
This repo is archived. MJML preview, lint, compile for Visual Studio Code.
Stars: ✭ 138 (-2.13%)
Mutual labels:  vscode
Ironpython Stubs
Autocomplete stubs for common IronPython/.NET libraries
Stars: ✭ 135 (-4.26%)
Mutual labels:  vscode
Vscode Swift
An extension for VS Code which provides support for the Swift language.
Stars: ✭ 132 (-6.38%)
Mutual labels:  vscode
Rocketseat Vscode Reactjs Snippets
Rocketseat ReactJS snippets for Visual Studio Code Editor
Stars: ✭ 136 (-3.55%)
Mutual labels:  vscode
Coddx Alpha
Coddx - a collection of tools that help developers program efficiently. One of the features is generating multiple files from templates quickly.
Stars: ✭ 132 (-6.38%)
Mutual labels:  vscode
Monacode
An es-module wrapper around the monaco editor and prettier
Stars: ✭ 137 (-2.84%)
Mutual labels:  vscode
Vscode Emacs Mcx
Awesome Emacs Keymap - VSCode emacs keybinding with multi cursor support
Stars: ✭ 135 (-4.26%)
Mutual labels:  vscode
Helm Intellisense
Extension for Visual Studio Code - Intellisense in helm-templates from the values.yaml
Stars: ✭ 137 (-2.84%)
Mutual labels:  vscode
Vscode Browse Lite
🚀 An embedded browser in VS Code
Stars: ✭ 134 (-4.96%)
Mutual labels:  vscode
Vscode Auto Close Tag
Auto Close Tag for Visual Studio Code
Stars: ✭ 132 (-6.38%)
Mutual labels:  vscode
Vscode Swift Development Environment
New home of Swift Development Environment for VS Code
Stars: ✭ 137 (-2.84%)
Mutual labels:  vscode
Advpl Vscode
Suporte para Advpl no VsCode
Stars: ✭ 132 (-6.38%)
Mutual labels:  vscode
Vscoq
A Visual Studio Code extension for Coq [[email protected],@fakusb]
Stars: ✭ 138 (-2.13%)
Mutual labels:  vscode
Vscode Neovim
VSCode Neovim Integration
Stars: ✭ 2,474 (+1654.61%)
Mutual labels:  vscode
Wsl Proxy
WSL proxy files for editor/linux interop
Stars: ✭ 134 (-4.96%)
Mutual labels:  wsl
Xwsl
Simple method to install Ubuntu 20.04 with XFCE4 desktop in WSL. Does not require hypervisor, container, or X11 server.
Stars: ✭ 137 (-2.84%)
Mutual labels:  wsl
Deno Vscode
🔨 A vscode extension to enhance development experience for deno
Stars: ✭ 141 (+0%)
Mutual labels:  vscode

WSLGit

Build Status

Use Git installed in WSL(windows Subsystem for Linux) from Windows and Visual Studio Code.

The project was inspired by A. R. S.'s project andy-5/wslgit written by Rust.
But why do I re-implement it by scripts, because I hope the wslgit tools could support any mount points (but not only under the /mnt/) and could be used without compiling.

Usage

  1. Please ensure git is installed in your WSL.
  2. Copy wslgit.sh to the /usr/bin/ or ~/bin directory in your WSL.
  3. Add the following config into your VSCode Settings.
    • { "git.path": "C:\\path\\to\\git.bat" }

🐢 Feeling slowly? (Disable interactive shell)

wslgit launch git installed in WSL in interactive shell mode by default now.
In short, the ssh-agent setup in .bashrc script is supported. but slower then non-interactive mode.

If you want disable interactive shell to reduce launch time, you can set Windows environment variable WSLGIT_USE_INTERACTIVE_SHELL to false.

via GUI

Set up environment variable

via Powershell

[System.Environment]::SetEnvironmentVariable("WSLGIT_USE_INTERACTIVE_SHELL", "false", "User")

Update

2019-04-16

  1. Fixed bug caused by Windows 10 19H1 changed the output of mount command

2019-03-11

  1. BREAKING CHANGE: Start git installed in WSL in interactive mode.
    • If you want to use non-interactive mode, just like before: Set Windows env variable WSLGIT_USE_INTERACTIVE_SHELL to true.
  2. Fixed error in the unix path to win path convert function.
  3. Added path converting for the output of git init

CHANGELOG

Under the hood

How does it work

  1. Pass all arguments and env variable WSLGIT_SH_CWD into wslgit.sh in WSL when you or VSCode execute git.bat.
  2. Get all mounted drive info by mount -t drvfs command in wslgit.sh.
  3. Move cwd(current working directory) to WSLGIT_SH_CWD.
  4. Iterate arguments, and replace each path argument from Windows style to Linux style by reference to mounted drive info.
  5. And convert the path in the git output to Windows style if git arguments included special keywords/actions. (Eg. rev-parse, remote)
  6. Why the it doesn't use wslpath for path convert, please reference to the test case: test-win/main.js

How to test it

How to contribute (issue/pull request)

CONTRIBUTING.md

Related links

Author

LiuYue (@hangxingliu)

Contributors

License

GPL-3.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].