docs: Use `git clone -c` to set `git pull` to rebase by default.

This updates the developer documentation to recommend `git clone -c`
to set the git pull mode to be rebase by default in the repository
configuration.

The hope is that this will help minimize how often new contributors
end up accidentally messing up their PRs by using `git pull`.

Tweaked by tabbott to fix broken links and optimize the language.

Fixes: #7022.
This commit is contained in:
Mohd Ali Rizwi 2017-10-17 07:43:46 +05:30 committed by Tim Abbott
parent 92caa4abab
commit 66d658d7f1
3 changed files with 39 additions and 21 deletions

View File

@ -273,7 +273,7 @@ the main server app, this is [zulip/zulip][github-zulip-zulip].
Next, clone your fork to your local machine:
```
$ git clone git@github.com:christi3k/zulip.git
$ git clone --config pull.rebase git@github.com:christi3k/zulip.git
Cloning into 'zulip'
remote: Counting objects: 86768, done.
remote: Compressing objects: 100% (15/15), done.
@ -283,6 +283,14 @@ Resolving deltas: 100% (61106/61106), done.
Checking connectivity... done.
```
(The `--config pull.rebase` option configures Git so that `git pull`
will behave like `git pull --rebase` by default. Using `git pull
--rebase` to update your changes to resolve merge conflicts is
expected by essentially all of open source projects, including Zulip.
You can also set that option after cloning using `git config --add
pull.rebase true`, or just be careful to always run `git pull
--rebase`, never `git pull`).
Note: If you receive an error while cloning, you may not have [added your ssh
key to GitHub][github-help-add-ssh-key].

View File

@ -8,8 +8,9 @@ Contents:
## Installing directly on Ubuntu
Start by cloning this repository: `git clone
https://github.com/zulip/zulip.git`
Start by [cloning your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
`git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git`
If you'd like to install a Zulip development environment on a computer
that's already running Ubuntu 16.04 Xenial or Ubuntu 14.04 Trusty, you
@ -61,8 +62,9 @@ Install the following non-Python dependencies:
#### Using the official Ubuntu repositories, PGroonga PPA and `tsearch-extras` deb package:
Start by cloning this repository: `git clone
https://github.com/zulip/zulip.git`
Start by [cloning your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
`git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git`
```
sudo apt-get install closure-compiler libfreetype6-dev libffi-dev \
@ -119,8 +121,9 @@ Now continue with the [All Systems](#all-systems) instructions below.
[zulip-ppa]: https://launchpad.net/~tabbott/+archive/ubuntu/zulip/+packages
Start by cloning this repository: `git clone
https://github.com/zulip/zulip.git`
Start by [cloning your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
`git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git`
```
sudo add-apt-repository ppa:tabbott/zulip
@ -139,8 +142,9 @@ Now continue with the [All Systems](#all-systems) instructions below.
These instructions are experimental and may have bugs; patches
welcome!
Start by cloning this repository: `git clone
https://github.com/zulip/zulip.git`
Start by [cloning your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
`git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git`
```
sudo dnf install libffi-devel memcached rabbitmq-server \
@ -156,8 +160,9 @@ Now continue with the [Common to Fedora/CentOS](#common-to-fedora-centos-instruc
These instructions are experimental and may have bugs; patches
welcome!
Start by cloning this repository: `git clone
https://github.com/zulip/zulip.git`
Start by [cloning your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
`git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git`
```
# Add user zulip to the system (not necessary if you configured zulip
@ -190,7 +195,7 @@ sudo yum install libffi-devel memcached rabbitmq-server openldap-devel \
sudo yum groupinstall "Development Tools"
# clone Zulip's git repo and cd into it
cd && git clone https://github.com/zulip/zulip && cd zulip/
cd && git clone --config pull.rebase https://github.com/zulip/zulip && cd zulip/
## NEEDS TESTING: The next few DB setup items may not be required at all.
# Initialize the postgres db
@ -214,8 +219,9 @@ Now continue with the [Common to Fedora/CentOS](#common-to-fedora-centos-instruc
These instructions are experimental and may have bugs; patches
welcome!
Start by cloning this repository: `git clone
https://github.com/zulip/zulip.git`
Start by [cloning your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
`git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git`
```
doas pkg_add sudo bash gcc postgresql-server redis rabbitmq \
@ -248,8 +254,9 @@ Finally continue with the [All Systems](#all-systems) instructions below.
### Common to Fedora/CentOS instructions
Start by cloning this repository: `git clone
https://github.com/zulip/zulip.git`
Start by [cloning your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
`git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git`
```
# Build and install postgres tsearch-extras module
@ -367,8 +374,9 @@ proxy in the environment as follows:
## Using Docker (experimental)
Start by cloning this repository: `git clone
https://github.com/zulip/zulip.git`
Start by [cloning your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
`git clone --config pull.rebase https://github.com/YOURUSERNAME/zulip.git`
The docker instructions for development are experimental, so they may
have bugs. If you try them and run into any issues, please report

View File

@ -278,9 +278,11 @@ Now you are ready for [Step 2: Get Zulip Code.](#step-2-get-zulip-code)
do this.
2. Open Terminal (macOS/Ubuntu) or Git BASH (Windows; must
**run as an Administrator**).
3. In Terminal/Git BASH, clone your fork:
3. In Terminal/Git BASH,
[clone your fork of the zulip repository](../contributing/git-guide.html#step-1b-clone-to-your-machine):
```
git clone git@github.com:YOURUSERNAME/zulip.git
git clone --config pull.rebase git@github.com:YOURUSERNAME/zulip.git
```
This will create a 'zulip' directory and download the Zulip code into it.
@ -290,7 +292,7 @@ something like:
```
christie@win10 ~
$ git clone git@github.com:YOURUSERNAME/zulip.git
$ git clone --config pull.rebase git@github.com:YOURUSERNAME/zulip.git
Cloning into 'zulip'...
remote: Counting objects: 73571, done.
remote: Compressing objects: 100% (2/2), done.