1.5 Getting Started — Installing Git
Before you start using Git, you have to make it available on your computer. Even if it’s already installed, it’s probably a good idea to update to the latest version. You can either install it as a package or via another installer, or download the source code and compile it yourself.
This book was written using Git version 2. Since Git is quite excellent at preserving backwards compatibility, any recent version should work just fine. Though most of the commands we use should work even in ancient versions of Git, some of them might not or might act slightly differently.
Installing on Linux
If you want to install the basic Git tools on Linux via a binary installer, you can generally do so through the package management tool that comes with your distribution. If you’re on Fedora (or any closely-related RPM-based distribution, such as RHEL or CentOS), you can use dnf :
$ sudo dnf install git-all
If you’re on a Debian-based distribution, such as Ubuntu, try apt :
$ sudo apt install git-all
For more options, there are instructions for installing on several different Unix distributions on the Git website, at https://git-scm.com/download/linux.
Installing on macOS
There are several ways to install Git on macOS. The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time.
$ git --version
If you don’t have it installed already, it will prompt you to install it.
If you want a more up to date version, you can also install it via a binary installer. A macOS Git installer is maintained and available for download at the Git website, at https://git-scm.com/download/mac.

Figure 7. Git macOS installer
Installing on Windows
There are also a few ways to install Git on Windows. The most official build is available for download on the Git website. Just go to https://git-scm.com/download/win and the download will start automatically. Note that this is a project called Git for Windows, which is separate from Git itself; for more information on it, go to https://gitforwindows.org.
To get an automated installation you can use the Git Chocolatey package. Note that the Chocolatey package is community maintained.
Installing from Source
Some people may instead find it useful to install Git from source, because you’ll get the most recent version. The binary installers tend to be a bit behind, though as Git has matured in recent years, this has made less of a difference.
If you do want to install Git from source, you need to have the following libraries that Git depends on: autotools, curl, zlib, openssl, expat, and libiconv. For example, if you’re on a system that has dnf (such as Fedora) or apt-get (such as a Debian-based system), you can use one of these commands to install the minimal dependencies for compiling and installing the Git binaries:
$ sudo dnf install dh-autoreconf curl-devel expat-devel gettext-devel \ openssl-devel perl-devel zlib-devel $ sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev \ gettext libz-dev libssl-dev
In order to be able to add the documentation in various formats (doc, html, info), these additional dependencies are required:
$ sudo dnf install asciidoc xmlto docbook2X $ sudo apt-get install asciidoc xmlto docbook2x
Users of RHEL and RHEL-derivatives like CentOS and Scientific Linux will have to enable the EPEL repository to download the docbook2X package.
If you’re using a Debian-based distribution (Debian/Ubuntu/Ubuntu-derivatives), you also need the install-info package:
$ sudo apt-get install install-info
If you’re using a RPM-based distribution (Fedora/RHEL/RHEL-derivatives), you also need the getopt package (which is already installed on a Debian-based distro):
$ sudo dnf install getopt
Additionally, if you’re using Fedora/RHEL/RHEL-derivatives, you need to do this:
$ sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
due to binary name differences.
When you have all the necessary dependencies, you can go ahead and grab the latest tagged release tarball from several places. You can get it via the kernel.org site, at https://www.kernel.org/pub/software/scm/git, or the mirror on the GitHub website, at https://github.com/git/git/tags. It’s generally a little clearer what the latest version is on the GitHub page, but the kernel.org page also has release signatures if you want to verify your download.
Then, compile and install:
$ tar -zxf git-2.8.0.tar.gz $ cd git-2.8.0 $ make configure $ ./configure --prefix=/usr $ make all doc info $ sudo make install install-doc install-html install-info
After this is done, you can also get Git via Git itself for updates:
$ git clone https://git.kernel.org/pub/scm/git/git.git
What Are «npm run dev» and «npm run prod»
Are these native npm commands or custom Laravel Mix commands? Where are they defined? I noticed they are listed as «scripts» in the Laravel package.json. What exactly are these scripts, custom commands for Webpack via Laravel Mix?
"scripts": < "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "npm run development -- --watch", "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" >,
asked Oct 16, 2020 at 22:08
3,684 13 13 gold badges 54 54 silver badges 98 98 bronze badges
You seem to have found what they are and where they’re defined, so what’s your question exactly? They’re NPM scripts.
Oct 16, 2020 at 22:21
What do they run, cross-env or webpack.js? Thanks for your help.
Oct 16, 2020 at 22:38
2 Answers 2
They are indeed the scripts as defined in the package.json file as you discovered. The values are run by your shell (so, for example, bash , zsh , etc. on UNIX-like operating systems).
One key thing to note is that the node_modules/.bin directory is added to PATH before executing. So, in the case of the two scripts you’re asking about, cross-env can be found in node_modules/.bin (because it’s almost certainly specified as a devDependency elsewhere in the package.json ) as long as you’ve already run npm install or npm ci within the project directory.
answered Oct 16, 2020 at 22:45
67.1k 25 25 gold badges 176 176 silver badges 213 213 bronze badges
Yeah, cross-env is listed in devDependencies. Thanks for your help, it helped me understand how these two custom scripts function, which is what I was looking for!
Oct 16, 2020 at 22:50
Those commands are used at any project which supports JSON files on NPM. Regarding OP questions:
Are these native npm commands or custom Laravel Mix commands? Where are they defined?
- npm : One could say that it is a command native to the system, for calling Node Package Manager program. In Windows, for example, it should be the default command for calling npm from any console.
- run : It is a command native to npm. More information here. Keep in mind this is an aliases to the original command run-script .
- dev and prod : They’re user defined.
- dev : Used for running the specific commands for serving the project, to any server, to live development. In the case of a web page, you’ll see your web page in the browser, and any change you make to the HTML code, for example, will be reflected immediately in the page you see in your browser.
- prod : Compiles all the necessary files for production. Final product. In the case of a web page, for example, the HTML, CSS, and JS files you’ll handle to the client. The result of running this command, it is expected to be one single folder with all the afore mentioned content.
I noticed they are listed as «scripts» in the Laravel package.json. What exactly are these scripts, custom commands for Webpack via Laravel Mix?
- «dev»: «npm run development» : Runs the commandment immediately below, which is: «development»: «cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js —progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js» . What this line of code does, depends on what dependencies you have on your project (see the node_modules folder, and read their respective documentation).
- «prod»: «npm run production» : It has the same description than the item above, but for npm run prod
Download and install
Download and install Go quickly with the steps described here.
For other content on installing, you might be interested in:
- Managing Go installations — How to install multiple versions and uninstall.
- Installing Go from source — How to check out the sources, build them on your own machine, and run them.
Don’t see your operating system here? Try one of the other downloads.
Go installation
Select the tab for your computer’s operating system below, then follow its installation instructions.
Linux Mac Windows
- Remove any previous Go installation by deleting the /usr/local/go folder (if it exists), then extract the archive you just downloaded into /usr/local, creating a fresh Go tree in /usr/local/go:
$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.14.3.linux-amd64.tar.gzexport PATH=$PATH:/usr/local/go/bin$ go version- Open the package file you downloaded and follow the prompts to install Go. The package installs the Go distribution to /usr/local/go. The package should put the /usr/local/go/bin directory in your PATH environment variable. You may need to restart any open Terminal sessions for the change to take effect.
- Verify that you’ve installed Go by opening a command prompt and typing the following command:
$ go version- Open the MSI file you downloaded and follow the prompts to install Go. By default, the installer will install Go to Program Files or Program Files (x86) . You can change the location as needed. After installing, you will need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt.
- Verify that you’ve installed Go.
- In Windows, click the Start menu.
- In the menu’s search box, type cmd , then press the Enter key.
- In the Command Prompt window that appears, type the following command:
$ go versionYou’re all set!
Visit the Getting Started tutorial to write some simple Go code. It takes about 10 minutes to complete.
Report Issues
If you spot bugs, mistakes, or inconsistencies in the Go project’s code or documentation, please let us know by filing a ticket on our issue tracker. Of course, you should check it’s not an existing issue before creating a new one.
Dev 2 check installer что это
Welcome to the Getting Started Guides! The purpose of this page is to describe each article and how to share your feedback.
# Extension development concepts
Extensions 101 Briefly covers some fundamental concepts of Chrome Extension development like web technologies and commonly used extension components. In addition, it includes what to be aware of when designing and distributing an extension in the Chrome Web Store. Development Basics Introduces the extension development workflow by creating a «Hello, Extensions» example. It walks through loading the extension during development, locating logs and errors, choosing a project structure, and using Typescript.
# Extension tutorials
Reading time It’s nice to know how much time we need to finish reading an article. Reading time teaches you how to insert an element containing the estimated reading time on every extension documentation page. Focus mode Removing extra clutter from a page allows our minds to concentrate on the most relevant information. Focus mode demonstrates how to change the style of extension documentation pages and hides a few distracting elements. Tabs manager While researching extension development, you can end up with many documentation tabs across multiple windows. Tabs Manager organizes your Chrome extension and Chrome Web store documentation tabs.
These tutorials not only teach you how to build real-world extensions but also strive to share development tips and best practices. In addition, using these extensions will improve your experience while reading the extension documentation.
Each tutorial includes the following sections:
- The task the extension will perform.
- The lessons that will be covered.
- What you need to know before starting.
- Step-by-step instructions on how to build the extension.
- How to load and test the extension.
If you are up for a challenge, we included a section with a few ideas on how to customize or add other features to your extension.
# Share your feedback
We are excited to hear from you! Here are two ways you can contribute:
Improve the existing tutorials If you see something wrong or unclear, report a bug on our GitHub repository. Request a beginner tutorial If you have an idea for another beginner tutorial, create an issue on our GitHub repository, choose «Extension tutorial request», and fill out the form.
We hope the new Getting Started guides help you feel confident and supported as you embark on your extension development journey.
Published on Tuesday, October 4, 2022 • Improve article
Table of contents
- Extension development concepts
- Extension tutorials
- Share your feedback