简体   繁体   中英

How can I implement a fast install of git using sh?

I need to get a classroom full of students to install git on their computers quickly and during a lecture. I've been inspired by the installation process of meteor to try and implement something similiar, ie:

curl easy-install-git.com | sh

I know there already exist binaries and easy ways to install git, but those are all multi-step processes and this would be one simple command in terminal. How do I write an sh script to do this? (Or better yet, does one exist already?)

Any other easy ways to do a git install on a clean machine would also be appreciated.

5 years later, the easiest/fastest way to install Git on Mac is to type:

git --version

If you don't have it installed already, it will prompt you to install it.

But that is an old Apple fork of Git (2.10 at most)

The git-osx-installer dmg files are up-to-date, with Git 2.18.
As seen in this script , it can be curl'd.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM