mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							a9e915007a
						
					
				
				
					commit
					cd83b94f3d
				
			@@ -75,7 +75,10 @@ See also [fixing commits][fix-commit]
 | 
			
		||||
- log
 | 
			
		||||
    - `git log`: show commit logs
 | 
			
		||||
- 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
 | 
			
		||||
    - `git push origin +branch-name`: push your commits to your origin repository
 | 
			
		||||
- rebase
 | 
			
		||||
@@ -98,3 +101,4 @@ See also [fixing commits][fix-commit]
 | 
			
		||||
    - `git status`: show the working tree status, unstaged and staged files
 | 
			
		||||
 | 
			
		||||
[fix-commit]: fixing-commits.html
 | 
			
		||||
[git-config-clone]: cloning.html#step-1b-clone-to-your-machine
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
[zulip-rtd-dev-first-time]: ../development/setup-vagrant.html
 | 
			
		||||
[zulip-rtd-dev-overview]: ../development/overview.html
 | 
			
		||||
[zulip-rtd-tools-setup]: ../git/zulip-tools.html#set-up-git-repo-script
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,9 @@
 | 
			
		||||
# 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
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
[zulip-rtd-review]: ../contributing/code-reviewing.html
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +1,16 @@
 | 
			
		||||
# 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
 | 
			
		||||
 | 
			
		||||
In the `tools` directory of [zulip/zulip][github-zulip-zulip] you'll find a
 | 
			
		||||
bash script `setup-git-repo`. This script installs the Zulip pre-commit hook.
 | 
			
		||||
This hook will run each time you `git commit` to automatically run linters,
 | 
			
		||||
etc. The hook passes no matter the result of the linter, but you should still
 | 
			
		||||
pay attention to any notices or warnings it displays.
 | 
			
		||||
In the `tools` directory of [zulip/zulip][github-zulip-zulip] you'll
 | 
			
		||||
find a bash script `setup-git-repo`. This script installs the Zulip
 | 
			
		||||
pre-commit hook.  This hook will run each time you `git commit` to
 | 
			
		||||
automatically run Zulip's linters on just the files that the commit
 | 
			
		||||
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:
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -347,4 +347,4 @@ will be useful in your journey, as well.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
[git-cheat-detailed]: git-cheat-sheet-detailed.html
 | 
			
		||||
[git-cheat-detailed]: ../git/cheat-sheet.html#detailed-cheat-sheet
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user