-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Using Git And GitHub
Here is a suggested git workflow for contributing code changes:
- Set up Git on your computer (instructions).
- Create a GitHub account (unless you already have one).
- Navigate to https://www.github.com/python/mypy and "fork" the repository. This gives you a clone of the repo hosted at GitHub under your GitHub account.
- Clone a local copy of your own fork of the repository. This creates a directory
mypy
under the current working directory. For example:
$ git clone https://github.com/<your-account>/mypy.git
- Change the directory to the original cloned repo (mypy):
$ cd mypy
-
Create a new branch in the local mypy repo for your changes (replace with a descriptive but short name):
$ git checkout -b <branch-name>
-
Now commit some changes to your local copy of the repository.
-
Test your changes a bit and fix any bugs you find.
-
Push the changes to the repo hosted under your GitHub account:
$ git push -u origin <branch-name>
-
Send a pull request according to these instructions: https://help.github.com/articles/creating-a-pull-request
-
Now the mypy developers will review and merge your changes. This may take a few days (or more), depending on how busy the developers are.
-
You probably want to check out the master branch again before continuing from step 5 for another contribution:
$ git checkout master
The above description did not mention some important things such as how to fetch and merge changes from the main mypy repo. Read this for more information:
Git tutorials for svn users:
General git information:
More about branching in git (it's not like in Subversion):
- http://learn.github.com/p/branching.html
- http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
Using hg to access git repositories (not verified; please edit this and add a comment if you try this):