Following these Forking instructions
- Go to
main/repo
and fork it from the top right. - Go to your forked repo
your/repo
(ex.Elucidation/repo
) and get the clone address. - Clone it on your local machine, ex.
git clone [email protected]:Elucidation/repo.git
Following these Syncing a Fork instructions
- In your local repo, set upstream for syncing with the main repo
- See current remotes:
$ git remote -v
origin [email protected]:Elucidation/repo.git (fetch)
origin [email protected]:Elucidation/repo.git (push)
Note: replace repo
with the name of the repo you're interested in
-
Add upstream:
git remote add upstream [email protected]:google/repo.git
-
See upstream in remotes:
$ git remote -v
origin [email protected]:Elucidation/repo.git (fetch)
origin [email protected]:Elucidation/repo.git (push)
upstream [email protected]:google/repo.git (fetch)
upstream [email protected]:google/repo.git (push)
Workflow is :
git fetch upstream
to note changes on main repogit merge upstream/master
to sync local repo to main repogit checkout -b new_branch
to create a new branch to make a change- Make changes on branch, commit etc as usual (make sure user.name and user.email is correct)
- Create a pull request through the web interface from main repo to merge changes from fork repo's branch to main repo's master
- Get +1 from someone else on main repo, make changes as needed locally
- Merge pull request
Don't I need to 'git pull' or something somewhere in Step Three?