git-docs: Make links to Zulip's git-tools at relevant places.

Tweaked by tabbott to fix a few issues with the text found while
looking at this.
This commit is contained in:
Rohitt Vashishtha
2017-11-26 22:44:28 +05:30
committed by Tim Abbott
parent a9e915007a
commit cd83b94f3d
5 changed files with 26 additions and 8 deletions

View File

@@ -75,7 +75,10 @@ See also [fixing commits][fix-commit]
- log - log
- `git log`: show commit logs - `git log`: show commit logs
- pull - pull
- **do not use for Zulip** - `git pull --rebase`: rebase your changes on top of master.
- `git pull` (with no options): Will either create a merge commit
(which you don't want) or do the asme as `git pull --rebase`,
depending on [whether you're configured Git properly][git-clone-config]
- push - push
- `git push origin +branch-name`: push your commits to your origin repository - `git push origin +branch-name`: push your commits to your origin repository
- rebase - rebase
@@ -98,3 +101,4 @@ See also [fixing commits][fix-commit]
- `git status`: show the working tree status, unstaged and staged files - `git status`: show the working tree status, unstaged and staged files
[fix-commit]: fixing-commits.html [fix-commit]: fixing-commits.html
[git-config-clone]: cloning.html#step-1b-clone-to-your-machine

View File

@@ -42,6 +42,11 @@ pull.rebase true`, or just be careful to always run `git pull
Note: If you receive an error while cloning, you may not have [added your ssh Note: If you receive an error while cloning, you may not have [added your ssh
key to GitHub][github-help-add-ssh-key]. key to GitHub][github-help-add-ssh-key].
Once the repository is cloned, we recommend running
[setup-git-repo][zulip-rtd-tools-setup] to install Zulip's pre-commit
hook which runs the Zulip linters on the changed files when you
commit.
## Step 1c: Connect your fork to Zulip upstream ## Step 1c: Connect your fork to Zulip upstream
Next you'll want to [configure an upstream remote Next you'll want to [configure an upstream remote
@@ -133,3 +138,4 @@ Zulip. ([See screen cast](../_static/zulip-travisci.gif).)
[travis-ci-profile]: https://travis-ci.org/profile [travis-ci-profile]: https://travis-ci.org/profile
[zulip-rtd-dev-first-time]: ../development/setup-vagrant.html [zulip-rtd-dev-first-time]: ../development/setup-vagrant.html
[zulip-rtd-dev-overview]: ../development/overview.html [zulip-rtd-dev-overview]: ../development/overview.html
[zulip-rtd-tools-setup]: ../git/zulip-tools.html#set-up-git-repo-script

View File

@@ -1,5 +1,9 @@
# Review changes # Review changes
**Note** - The following section covers reviewing changes on your local
clone. Please read the section on [code reviews][zulip-rtd-review] for a guide
on reviewing changes by other contributors.
## Changes on (local) working tree ## Changes on (local) working tree
Display changes between index and working tree (what is not yet staged for commit): Display changes between index and working tree (what is not yet staged for commit):
@@ -56,3 +60,5 @@ Display changes you've committed so far since creating a branch from upstream/ma
``` ```
$ git diff upstream/master...HEAD $ git diff upstream/master...HEAD
``` ```
[zulip-rtd-review]: ../contributing/code-reviewing.html

View File

@@ -1,14 +1,16 @@
# Zulip-specific tools # Zulip-specific tools
This section will document the zulip-specific git tools contributors will find helpful. This article documents several useful tools that can save you a lot of
time when working with Git on the Zulip project.
## Set up git repo script ## Set up git repo script
In the `tools` directory of [zulip/zulip][github-zulip-zulip] you'll find a In the `tools` directory of [zulip/zulip][github-zulip-zulip] you'll
bash script `setup-git-repo`. This script installs the Zulip pre-commit hook. find a bash script `setup-git-repo`. This script installs the Zulip
This hook will run each time you `git commit` to automatically run linters, pre-commit hook. This hook will run each time you `git commit` to
etc. The hook passes no matter the result of the linter, but you should still automatically run Zulip's linters on just the files that the commit
pay attention to any notices or warnings it displays. modifies. The hook passes no matter the result of the linter, but you
should still pay attention to any notices or warnings it displays.
It's simple to use. Make sure you're in the clone of zulip and run the following: It's simple to use. Make sure you're in the clone of zulip and run the following:

View File

@@ -347,4 +347,4 @@ will be useful in your journey, as well.
![Git - XKCD 1597](https://imgs.xkcd.com/comics/git.png) ![Git - XKCD 1597](https://imgs.xkcd.com/comics/git.png)
[git-cheat-detailed]: git-cheat-sheet-detailed.html [git-cheat-detailed]: ../git/cheat-sheet.html#detailed-cheat-sheet