From db54ef400b08dfd4aa8480705f739ebfddf1eb64 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 3 Feb 2015 15:32:45 -0800 Subject: [PATCH] Fix 'git remote add' command argument order --- CodeReview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodeReview.md b/CodeReview.md index e9038848..88b4f727 100644 --- a/CodeReview.md +++ b/CodeReview.md @@ -29,7 +29,7 @@ To use GitHub as a git remote, you can either fork github.com/golang/go or creat To add your git remote, run something like: ```bash -$ git remote add git@github.com:yourusername/go.git fork +$ git remote add fork git@github.com:yourusername/go.git ``` You can then push changes to the "fork" remote with `git push fork branchname`. @@ -37,7 +37,7 @@ You can then push changes to the "fork" remote with `git push fork branchname`. Gerrit's code review model is to rewrite a single commit until it is correct. GitHub will try to prevent you from accidentally overwriting your existing branch. You can work around this by forcing the push: `git push --force fork branchname`. Alternatively, you can set up your forked remote as a mirror by cloning it initially with: ```bash -$ git remote add --mirror=push git@github.com:yourusername/go.git fork +$ git remote add --mirror=push fork git@github.com:yourusername/go.git ``` Then running `git push fork` will update GitHub to perfectly mirror *everything* (all branches, all tags, etc.). This is handy, but take care when using this on multiple clients. You are bypassing the usual git safeguards, so it is easy to overwrite (and thus lose) work pushed by a different client.