Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Git through Cygwin from Windows

Tags:

git

cygwin

I have started using Cygwin recently for other purposes and already have Git installed on my PC. I understand I can run the executable and install Git into Cygwin, but since I already have it installed I would like Cygwin to just use my Windows installation. I have tried researching how to make the path redirect in various ways but with no success, can someone help me out?

like image 365
jh_ Avatar asked Mar 28 '13 21:03

jh_


People also ask

How do I run Git in Cygwin?

In there, you can do a sudo apt-get install git-core and start using git on project-sources present either on the WSL container's "native" file-system (see below), or in the hosting Windows's file-system through the /mnt/c/... , /mnt/d/... directory hierarchies.

Does Git for Windows use Cygwin?

Coincidentally enough, Git comes with the Cygwin net release. You can use the gitweb interface.

How do I access Cygwin in Git?

Cygwin in Git. The sources to the core Cygwin libraries and utilities (Cygwin and Newlib) are available via anonymous Git access. If you don't know what Git is, visit the Git home page. Coincidentally enough, Git comes with the Cygwin net release. To access the repository from your system, use one of the following commands:

Where can I find the source code for a Cygwin library?

The sources to the core Cygwin libraries and utilities (Cygwin and Newlib) are available via anonymous Git access. If you don't know what Git is, visit the Git home page . Coincidentally enough, Git comes with the Cygwin net release.

How do I run bash in Cygwin?

If you are using another shell, please confirm the way to get Cygwin’s /usr/binand /usr/local/bininto PATHfor your shell. Therefore, the full command to run Bash in Cygwin is C:\cygwin64\bin\bash.exe -i -l. If you have installed Cygwin to a non-default path and/or want to use another shell, then please change the command accordingly.

Can Git and msysgit coexist on the same computer?

I confirm that git and msysgit can coexist on the same computer, as mentioned in " Which GIT version to use cygwin or msysGit or both? ". Git on Cygwin, after installing its package, will run in its own cygwin bash shell. Finally, since Q3 2016 and the "Windows 10 anniversary update", you can use Git in a bash (an actual Ubuntu (!) bash ).


1 Answers

I confirm that git and msysgit can coexist on the same computer, as mentioned in "Which GIT version to use cygwin or msysGit or both?".

  1. Git for Windows (msysgit) will run in its own shell (dos with git-cmd.bat or bash with Git Bash.vbs)
    Update 2016: msysgit is obsolete, and the new Git for Windows now uses msys2

  2. Git on Cygwin, after installing its package, will run in its own cygwin bash shell.

git package selection on Cygwin

  1. Finally, since Q3 2016 and the "Windows 10 anniversary update", you can use Git in a bash (an actual Ubuntu(!) bash).

http://www.omgubuntu.co.uk/wp-content/uploads/2016/08/bash-1.jpg

In there, you can do a sudo apt-get install git-core and start using git on project-sources present either on the WSL container's "native" file-system (see below), or in the hosting Windows's file-system through the /mnt/c/..., /mnt/d/... directory hierarchies.

Specifically for the Bash on Windows or WSL (Windows Subsystem for Linux):

  • It is a light-weight virtualization container (technically, a "Drawbridge" pico-process,
  • hosting an unmodified "headless" Linux distribution (i.e. Ubuntu minus the kernel),
  • which can execute terminal-based commands (and even X-server client apps if an X-server for Windows is installed),
  • with emulated access to the Windows file-system (meaning that, apart from reduced performance, encodings for files in DrvFs emulated file-system may not behave the same as files on the native VolFs file-system).
  • Unfortunately, it cannot invoke back into Windows executables, or
  • interact with any native drivers (i.e. so no Graphic card, no USB drives yet).
like image 179
VonC Avatar answered Sep 27 '22 19:09

VonC