docs/git/working-copies.md
When you work on Zulip code, there are three copies of the Zulip Git repository that you are generally concerned with:
upstream remote. This is the official Zulip
repository on GitHub. You probably
don't have write access to this repository.When you work on Zulip code, you will end up moving code between the various working copies.
Sometimes you need to get commits. Here are some scenarios:
Sometimes you want to publish commits. Here are some scenarios:
Finally, the Zulip core team will occasionally want your changes!
main branch.The following commands are useful for moving commits between working copies:
git fetch: This grabs code from another repository to your local
copy. (Defaults to fetching from your default remote, origin).git fetch upstream: This grabs code from the upstream repository to your local copy.git push: This pushes code from your local repository to one of the remotes.git remote: This helps you configure short names for remotes.git pull: This pulls code, but by default creates a merge commit
(which you definitely don't want). However, if you've followed our
cloning documentation, this will do
git pull --rebase instead, which is the only mode you'll want to
use when working on Zulip.