-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a script for installing and updating Git-for-windows on Msys2 ( including Git-for-windows ) and Cygwin #261
Conversation
This script could install and update the git-for-windows's binary and necessary files on msys2 without messing up your msys2 due to the already installed msys2 has already contained most of the files which is needed by the git-for-windows's binary files. This script will check the latest released version of the git-for-windows via its tags page on github and then download it via wget or curl... and then extract, copy and clean up Signed-off-by: liuxy <[email protected]>
Signed-off-by: liuxy <[email protected]>
Two questions:
|
|
@dscho If it's not too late, may I ask where may I submit these scripts, here or the repo |
Sorry for the delay in answering; I've been a bit busy with preparing Git for Windows v2.24.0-rc0 (and it is still not finished, I am waiting for the automation to fail again so that I can fix yet another problem...).
Oh, sorry, I think this is the correct repository. But I thought your script was meant to be run in a fully populated Git for Windows SDK? If so, it would probably make sense to install it as part of the
Silly question: why not just run the Portable installer in silent mode? |
Thank you for your hard-working on
To make it work, one of the executables of
Whoa, I missed that simple solution... I didn't even notice that the self-extractable 7z package could do that kind of thing. that's a new thing I've learned today, thank you! I'll try that out in a few days. |
You're welcome!!!
Excellent.
Perfect. Please do let us know how that goes. |
That aside, this commit contains a lot of changes that can make it possible to successfully get or update git-on-windows on `Msys2` or `Cygwin` which is generally tested. Also, a feature of generating scripts of adding and removing context menu items (`Git Bash Here` and `Git GUI Here` is included in this commit so that user could easily add or remove these two context menu items as they wish. Last but not least, the two scripts are now one single file which makes it possible to call this script without downloading via a single command `curl ... | bash` Signed-off-by: liuxy <[email protected]>
@dscho So here's a question, is it worth to put an instruction about this feature in the readme? |
…ere` So that the generating feature won't fail when there's now /cmd folder available, and fixes the `hook execution requires sh (not in PATH)` error when using `Git GUI Here` on Cygwin whose default bin folder is `/bin` rather than `/usr/bin`. In addition: There's a known issue that are hard to fix without breaking the principle of `keeping every existing things intact`: the `Git Bash Here` on Cygwin won't have a nice prompt which shows the current branch of current directory. To fix this, the `/etc/bash.bashrc` needs be edited. Signed-off-by: liuxy <[email protected]>
Oh, now I feel bad! Do go and spend time with your family, I would suggest. Git for Windows will still be there when you actually have time to work on it.
Sure, but please do not feel any pressure to add that! |
I could not find a sensible section to put in the readme, so I finally added an introduction in the wiki. Oh, I followed you on twitter ⭐️ 😄. |
That makes a lot of sense to me! Thank you! |
My pleasure! |
Hey, @sinloss. After discussing this installation method on Gitter, I would like to ask if you'd be okay with me reorganizing your wiki article to better separate the How to instructions from the rest. |
Sure! Of course. |
As adviced by @dscho in the thread git-for-windows/git#1335, I committed this PR to find a home for these scripts which might and are glad to help others
The
gitupdate
could install and update thegit-for-windows
's binary and copy all necessary files on msys2 without messing up your msys2 due to the already installed msys2 environment which has already contained most of the files which are needed by thegit-for-windows
's binary files. This script will check the latest released version of the git-for-windows via its tags page on Github and then download it usingwget
orcurl
(if wget cound not be found nor installed by Pacman)... and then extract files into/tmp
from the downloaded installer usinginnounp
, copy necessary files and clean up all the temp files at last.The
upkit
is a tool kit forgitupdate
containing some reusable functions, this might be useful if someone wants to write a similar script. I personally wrote a script to install and update the latestmetasploit-framework
usingupkit
as well. (If anyone is interested, I could create a public repo and share that)This might work on cygwin, but not assured.
Signed-off-by: liuxy [email protected]