diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b39d95d7d6..c998bb8f11 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,45 @@ Please add `[ci skip]` to commits that should be ignored by the CI systems All pull requests **must** pass both CI systems before they will be approved. +## Installation + +#### Windows + +Install [Git for Windows][]. + +During the install process, choose these recommended settings: + +* Use Git from the Windows Command Prompt +* Use OpenSSH +* Checkout Windows-style, commit Unix-style line endings +* Use Windows' default console window +* Enable file system caching + +#### Linux + +Install via the package manager: + +```sh +sudo apt-get install git +``` + +#### Authentication + +If you do not have a preferred method of authentication, enable the storage +credential helper, which will cache your credentials in plaintext on your +system, so use a [token][]. + +```sh +git config --global credential.helper store +``` + +Alternatively, on Windows, you can try the +[Git Credential Manager for Windows][manager]. + +[manager]: https://github.com/Microsoft/Git-Credential-Manager-for-Windows +[Git for Windows]: https://git-scm.com/download/win +[token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/ + ## New to Git? If you're new to Git, learn the following commands: `checkout`, `branch`, diff --git a/README.md b/README.md index 37d4eedcb1..06c462b0d5 100644 --- a/README.md +++ b/README.md @@ -10,64 +10,47 @@ ### Setup Git - Install [Git][], the version control system. -#### Windows - -Install git from [official web-site](https://git-scm.com/download/win) - -During install process pick this recommended settings: - -* Use git and optional unix tools from windows prompt -* Checkout windows style, checking unix style -* Use windows default console windows - -Install [windows git credential helper](https://github.com/Microsoft/Git-Credential-Manager-for-Windows) - -#### Linux - -```sh -sudo apt-get install git -``` - -If you do not have a preferred method of authentication, enable the storage -credential helper, which will cache your credentials in plaintext on your -system, so use a [token][]. - -```sh -git config --global credential.helper store -``` - -See the [Contributing Guidelines](CONTRIBUTING.md) for more Git information. +See the [Contributing Guidelines](CONTRIBUTING.md) for more Git +information, such as our installation instructions, contributing +rules, and Git best practices. [Git]: https://git-scm.com/documentation -[token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/ ### Download source code -Clone this repository recursively, as it's the superproject with a number of -submodules. +Clone this repository. It is a "superproject" and has a number of +other repositories embedded within it as submodules. *Please* see the +contributing guidelines and learn about submodules. ```sh -git clone --recursive https://github.com/PowerShell/PowerShell.git +git clone https://github.com/PowerShell/PowerShell.git +cd PowerShell +``` + +#### Linux + +Linux will need every submodule, so update them recursively: + +```sh +git submodule update --init --recursive ``` The `src/omi` submodule requires your GitHub user to have joined the Microsoft organization. If it fails to check out, Git will bail and not check out further submodules either. Please follow the instructions on the [Open Source Hub][]. -On Windows, many fewer submodules are needed, so don't use `clone --recursive`. +[Open Source Hub]: https://opensourcehub.microsoft.com/articles/how-to-join-microsoft-github-org-self-service -Instead run: +#### Windows -``` -git clone https://github.com/PowerShell/PowerShell.git +On Windows, many fewer submodules are needed, so specify them: + +```sh git submodule update --init --recursive -- src/monad src/windows-build src/Microsoft.PowerShell.Linux.Host/Modules/Pester ``` -[Open Source Hub]: https://opensourcehub.microsoft.com/articles/how-to-join-microsoft-github-org-self-service - ## Setup build environment We use the [.NET Command Line Interface][dotnet] (`dotnet`) to build