How do you upgrade your git installation using the windows command prompt? - windows

I recently installed railsinstaller on my computer, but have noticed that the installation for git that came with the application is old. I wanted to install it through the git installer, but it never showed me where I would like for the location of git to be at. My other solution is to upgrade it through the command prompt without using the git installer. How do I do this? Which commands would I have to use in the command prompt terminal?

Installing software from the command prompt isn't an easy task on Windows. First, you will need to find out what technology was used to create the installation package. Then you need to download a (UI based) tool which can modify the installation package to stop asking questions and just do what you want. It's certainly possible ... if you can spend a couple of hours or days to find out how.
Now the reason why the git installer isn't asking is probably because it detects an existing install and wants to upgrade it - since the "new" place must be the old place, no question is asked. To "fix" this, you can try to deinstall Git (Control Panel -> Installed Software -> Remove). When you run the installer again, it should give you more options.
If you just want to update the command line tools, you can also try to unpack the installer or install on a second computer. That should give you the git.exe plus all the DLLs and scripts which you can then copy manually. But Git on Windows also install a MINGW environment with a shell and to update that, you probably have to run the installer so it can make the necessary changes to the registry.

Related

Git windows installer not letting me choose install location

I am trying to install git using their windows installer from https://git-scm.com/downloads (I have windows 10). When I try to install Git I get unable to get system config then I get " C:\Users\Me\Appdata\Local\Temp\is-VML96.tmp\git-config-get.txt"
Its weird but If I click okay through both it takes me to the standard install setup as seen below:
Now if I click next it SHOULD take me to this screen:
The problem is I never get this screen to choose where I want to install git. I never get this screen above, my computer tries to install it to my system reserved which is only 100Mb.
I have tried multiple different versions of git.
What is causing git not to allow me to choose an install location?
If you run the installation executable from a command line and pass /help you'll get a list of additional commands you can run. The one you need is:
/DIR="x:\dirname"
Here's the list of available arguments:

Android Studio Path to Git executable

I'm developing on windows but have installed Bash for Windows (basically a Unix terminal for those who don't know about Windows 10 anniversary update). I installed git through this terminal (sudo apt-get install git) as opposed to downloading it as a Windows application from GitHub.
I'm now trying to integrate Git into Android Studio, and it's asking for a path to the Git executable. Because I didn't download it as a Windows application, there is no .exe, and instead I've tried to give the path C:\Users\Faizan\AppData\Local\lxss\rootfs\usr\bin\git which is where the terminal tells me where Git is when I type type git. I didn't really expect this to work because it's not an .exe but I'm stuck on ideas from here.
How can I make this work without having to download Git for Windows? How do people who develop on Unix systems deal with this path as they don't have an executable file either?
You still have to download Git For Windows.
Try the portable edition: PortableGit-2.10.0-64-bit.7z.exe
It comes with a bash, but even without opening a bash, you sttill have (in a regular Windows CMD session) 200+ Linux commands in <yourGit2.10>\usr\bin.
And of course, it has a git.exe, which is what your Android Studio needs.

How to upgrade Git on windows?

I'm currently running git version 1.8.0-preview20121022 on windows 7. I'd like to upgrade to the current latest version 1.9.4-preview20140611. I downloaded the installer Git-1.9.4-preview20140611.exe and ran it. It complains that I'd need to close Windows Explorer:
Clicking next just brings up an error. How am I supposed to upgrade git? Am I supposed to open the task manager and find that pid and kill it? Also my existing git installation is not in the standard program files folder, is the installer going to ask where I want to install git (so far it hasn't)?
First - reboot. You just may have a rogue run-away explorer process. It is, however, a tiny bit safer to reboot than to just kill it by its PID IMHO.
If that doesn't help - log into Windows with your admin user. With any luck it won't have the shell integration running and will not have the needed files in-use. Install your new GiT from that admin account.
If that still doesn't help... Time to use the "kill by PID" way and force your way through!
Good luck :)

Changing my mind about the PATH when setting up Git for Windows

I have Git on my Windows 7 computer, and when I set it up, I chose Git Bash only, to be safe. Now, I want to install Aptana Studio 3, and one of the requirements is that I have Git, with the ability to use Git from the command line, which I understand is not the case now. How can I go back and change that setting?
Have you tried reinstalling Git? Many windows installers support the concept of reinstalling, allowing you to pick your installation options again.
If that doesn't work, I'd suggest uninstall/reinstall.
You can just edit the system PATH environment variable to include c:\Program Files\Git\cmd or wherever you installed Git to. The git.cmd and gitk.cmd batch scripts setup the right environment and that is all the installer does for you.

How do I manually install an old cygwin package?

A project I am working on requires an old version of SLAPD (the LDAP
server) and must run on Windows, hence I am using cygwin packages:
I've found a binary package of slapd version I need 2.2.x here:
http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/release/...
How do I manually install it in cygwin? It does not seem to be a package-manager file format (like an RPM or a Deb), but is there a tool to install it for me?
FYI, I'm operating behind a corporate firewall that prevents me from viewing the main cygwin site (including the documentation), so please nobody tell me to RTFM - I wish I could!
Thanks
If you need an older version, the Cygwin time machine might help. To use it, I had to invoke setup.exe from the command line, giving it the --no-verify/-X option and it still wouldn't let me downgrade the "cygwin" package itself but at least it is, albeit very slowly, allowing me to install the version I wanted to test as a parallel installation.
If you are using the cygwin package installer to install this package, usually if you select to view the full info and scroll to the package you need you will see some info about the version.
Now if you click on the version number you will see that it changes from the oldest in the repository to the current. If your repository has the version you need then just finish the wizard.
Some cygwin mirrors keep old package files, for example, http://mirror.isoc.org.il/pub/cygwin/
You can use Sonatype nexus to mirror an existing cygwin repository, but provide your own setup.ini .
Copy the already downloaded repo content to c:\progs\nexus\sonatype-work\nexus\storage\mirror.isoc.org.il-pub-cygwin\
Put your own setup.ini and setup.bz2 there.
Start setup.exe with --no-verify
Paste
http://localhost:8081/nexus/content/repositories/mirror.isoc.org.il-pub-cygwin/
into the mirror selection box and click "Add"

Resources