Revision [1271]

Last edited on 2013-03-10 20:41:35 by ChrisBuechler [update github repo]
Additions:
git clone git@github.com:pfsense/myname-mystuff.git mydirectory
git clone https://github.com/pfsense/pfsense.git
== Checking out pfSense's GIT repo with a github account ==
git clone git@github.com:pfsense/pfsense.git
Deletions:
git clone git@rcs.pfsense.org:pfsense/myname-mystuff.git mydirectory
git clone https://github.com/bsdperimeter/pfsense.git
== Checking out pfSense's GIT repo with a rcs.pfsense.org account ==
git clone git@github.com:bsdperimeter/pfsense.git


Revision [1188]

Edited on 2011-05-19 03:50:15 by ChrisBuechler [update github repo]
Additions:
If you want to create a clone to make merge requests back, you need a github account. Sign up for a free account here.
Deletions:
Sign up for a free account here.


Revision [1187]

Edited on 2011-05-19 03:49:46 by ChrisBuechler [update github repo]
Additions:
== Register on Github ==
Sign up for a free account here.
https://github.com/signup/free
http://help.github.com/fork-a-repo/
git clone https://github.com/bsdperimeter/pfsense.git
Your SSH key must be available, as entered in Github.
git clone git@github.com:bsdperimeter/pfsense.git
Deletions:
== Register on Gitorious ==
# Open a browser and go to [[https://rcs.pfsense.org/]]
# Click "Register" in the upper right
# Fill out and submit the form
# Wait for the e-mail confirmation, and click the link to activate
# Once activated, make sure you are logged in
# Click "My Account" in the upper left
# Click "Edit Details" and fill out the other information if you want, and save
# Click "Add SSH Key"
# Paste _one_ of your public ssh keys into the text area. Typically these are found in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub
If you do not have an SSH key, creating one is usually as simple as typing "ssh-keygen" from a shell prompt (or within msysgit's git bash).
# Click save, and wait. It may take a few minutes for the key to be active.
# If you have additional keys, add them one at a time.
Once you are registered, and your keys are in place, someone may grant you commit access.
# First browse to the repository you want to clone in Gitorious, such as: [[https://rcs.pfsense.org/projects/pfsense/repos/mainline]]
# Click Clone Repository (on the right)
# Give it a name, something like "myname-patches" or "myname-whatimworkingon"
# Click the Clone Repository button
# ...wait...
# You should now be able to browse to your clone in Gitorious, and it will give you the clone and push URL you can use with git, such as:
git@rcs.pfsense.org:pfsense/myname-mystuff.git
== Merge Requests from Private Repo Clones ==
Once you have your repo in a good state with your patches, you can submit a merge request.
# First, browse to your cloned repository URL in Gitorious, such as [[https://rcs.pfsense.org/projects/pfsense/repos/myname-mystuff]]
# Click "Request Merge" on the right
# Pick "mainline" for the target repo
# Enter the target branch, master for HEAD, or RELENG_1_2, or whatever branch you need
# Enter the source branch, which is the branch of -your- clone that you want to merge from. It will usually match the above option.
# Type a description of what you want done, why the change is needed, tickets it closes, etc, etc.
# Click "Create Merge Request"
# Wait for a developer to approve or reject the request.
git clone http://gitweb.pfsense.org/pfsense/mainline.git
Your SSH key must be available, as entered in Gitorious.
git clone git@rcs.pfsense.org:pfsense/mainline.git
== Small changes ==
For changes that are usually one file in nature and small bugfixes, you usually don't want to go through the effort of forking the repo, making changes, pushing and merging back to mainline.
You'll clone the mainline pfsense repo, checkout whichever branch you need (we'll assume it's master here)
git clone http://gitweb.pfsense.org/pfsense/mainline.git
cd mainline
git config remote.origin.url git@rcs.pfsense.org:pfsense/mainline.git
git checkout master
git branch patches
# ...work...work...work
git commit
# work/commit as needed
# now we do the merge dance - switch back to master branch and update from the mainline repo
git checkout master
# For small changes I prefer to rebase over pull as you likely haven't shared your changes
git fetch origin
# switch to our patches branch and merge in changes from master
git checkout patches
git rebase master
# fix any merge conflicts and commit
# now that our patches branch includes all upstream changes, we'll switch back to master, merge, and push
git checkout master
git merge patches
== Large changes requiring a clone ==
You'll clone the mainline pfsense repo in Gitorious, checkout whichever branch you need (we'll assume it's master here). We'll clone our Gitorious clone locally and setup a remote tracking branch for the mainline repo
git clone http://gitweb.pfsense.org/pfsense/yourclone.git
cd yourclone
git config remote.origin.url git@rcs.pfsense.org:pfsense/yourclone.git
git checkout master
git branch patches
# ...work...work...work
git commit
# work/commit as needed
# At some point you might wish to share your work before merging the mainline tree back in
# Finally ready to merge with the mainline
# I like to separate the pull into a fetch and merge
git checkout master
# switch to our patches branch and merge in changes from master
git checkout patches
git merge master
# fix any merge conflicts and commit
# now that our patches branch includes all upstream changes, we'll switch back to master, merge, and push
git checkout master
git merge patches
Request a merge with mainline from the Gitorious screen
== How to push your local repo changes back to Gitorious ==
git push git@rcs.pfsense.org:pfsense/mainline.git


Revision [1169]

Edited on 2010-04-11 04:11:37 by ChrisBuechler [revert spam]

No Differences

Revision [811]

Edited on 2009-03-14 22:42:26 by JimP [revert spam]
Additions:
If you find that after "git fetch", you cannot "git rebase origin" because it says that files need updating, you may need to reset like so:
git reset --hard origin
Be aware that you'll lose your local changes, but when I saw this error they were actually files I had never touched, and checking them out again did not help.


Revision [764]

Edited on 2009-03-03 02:07:44 by JimP [revert spam]
Additions:
== Problems? ==
You should really not use "pull" - instead, do this:
git fetch
You can fix messages like "Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded" by commiting your work, and then rebasing.


Revision [762]

Edited on 2009-03-02 14:56:00 by BillM [revert spam]
Additions:
git fetch origin


Revision [678]

Edited on 2009-02-26 21:51:33 by JimP [revert spam]
Additions:
# Open a browser and go to [[https://rcs.pfsense.org/]]
# Click "Register" in the upper right
# Fill out and submit the form
# Wait for the e-mail confirmation, and click the link to activate
# Once activated, make sure you are logged in
# Click "My Account" in the upper left
# Click "Edit Details" and fill out the other information if you want, and save
# Click "Add SSH Key"
# Paste _one_ of your public ssh keys into the text area. Typically these are found in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub
# Click save, and wait. It may take a few minutes for the key to be active.
# If you have additional keys, add them one at a time.
# First browse to the repository you want to clone in Gitorious, such as: [[https://rcs.pfsense.org/projects/pfsense/repos/mainline]]
# Click Clone Repository (on the right)
# Give it a name, something like "myname-patches" or "myname-whatimworkingon"
# Click the Clone Repository button
# ...wait...
# You should now be able to browse to your clone in Gitorious, and it will give you the clone and push URL you can use with git, such as:
# First, browse to your cloned repository URL in Gitorious, such as [[https://rcs.pfsense.org/projects/pfsense/repos/myname-mystuff]]
# Click "Request Merge" on the right
# Pick "mainline" for the target repo
# Enter the target branch, master for HEAD, or RELENG_1_2, or whatever branch you need
# Enter the source branch, which is the branch of -your- clone that you want to merge from. It will usually match the above option.
# Type a description of what you want done, why the change is needed, tickets it closes, etc, etc.
# Click "Create Merge Request"
# Wait for a developer to approve or reject the request.
git clone git@rcs.pfsense.org:pfsense/myname-mystuff.git mydirectory
cd mydirectory
Deletions:
* Open a browser and go to [[https://rcs.pfsense.org/]]
* Click "Register" in the upper right
* Fill out and submit the form
* Wait for the e-mail confirmation, and click the link to activate
* Once activated, make sure you are logged in
* Click "My Account" in the upper left
* Click "Edit Details" and fill out the other information if you want, and save
* Click "Add SSH Key"
* Paste _one_ of your public ssh keys into the text area. Typically these are found in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub
* Click save, and wait. It may take a few minutes for the key to be active.
* If you have additional keys, add them one at a time.
* First browse to the repository you want to clone in Gitorious, such as: [[https://rcs.pfsense.org/projects/pfsense/repos/mainline]]
* Click Clone Repository (on the right)
* Give it a name, something like "myname-patches" or "myname-whatimworkingon"
* Click the Clone Repository button
* ...wait...
* You should now be able to browse to your clone in Gitorious, and it will give you the clone and push URL you can use with git, such as:
* First, browse to your cloned repository URL in Gitorious, such as [[https://rcs.pfsense.org/projects/pfsense/repos/myname-mystuff]]
* Click "Request Merge" on the right
* Pick "mainline" for the target repo
* Enter the target branch, master for HEAD, or RELENG_1_2, or whatever branch you need
* Enter the source branch, which is the branch of -your- clone that you want to merge from. It will usually match the above option.
* Type a description of what you want done, why the change is needed, tickets it closes, etc, etc.
* Click "Create Merge Request"
* Wait for a developer to approve or reject the request.
git clone git@rcs.pfsense.org:pfsense/myname-mystuff.git


Revision [677]

Edited on 2009-02-26 21:36:13 by JimP [Added some more detail on Gitorious and basic usage]
Additions:
== Register on Gitorious ==
* Open a browser and go to [[https://rcs.pfsense.org/]]
* Click "Register" in the upper right
* Fill out and submit the form
* Wait for the e-mail confirmation, and click the link to activate
* Once activated, make sure you are logged in
* Click "My Account" in the upper left
* Click "Edit Details" and fill out the other information if you want, and save
* Click "Add SSH Key"
* Paste _one_ of your public ssh keys into the text area. Typically these are found in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub
If you do not have an SSH key, creating one is usually as simple as typing "ssh-keygen" from a shell prompt (or within msysgit's git bash).
* Click save, and wait. It may take a few minutes for the key to be active.
* If you have additional keys, add them one at a time.
Once you are registered, and your keys are in place, someone may grant you commit access.
== Creating your own private repository clone ==
It is best to create your own clone and work on it, in whatever branch you need. You can then submit a merge request to have your features merged into the main repository
* First browse to the repository you want to clone in Gitorious, such as: [[https://rcs.pfsense.org/projects/pfsense/repos/mainline]]
* Click Clone Repository (on the right)
* Give it a name, something like "myname-patches" or "myname-whatimworkingon"
* Click the Clone Repository button
* ...wait...
* You should now be able to browse to your clone in Gitorious, and it will give you the clone and push URL you can use with git, such as:
git@rcs.pfsense.org:pfsense/myname-mystuff.git
== Merge Requests from Private Repo Clones ==
Once you have your repo in a good state with your patches, you can submit a merge request.
* First, browse to your cloned repository URL in Gitorious, such as [[https://rcs.pfsense.org/projects/pfsense/repos/myname-mystuff]]
* Click "Request Merge" on the right
* Pick "mainline" for the target repo
* Enter the target branch, master for HEAD, or RELENG_1_2, or whatever branch you need
* Enter the source branch, which is the branch of -your- clone that you want to merge from. It will usually match the above option.
* Type a description of what you want done, why the change is needed, tickets it closes, etc, etc.
* Click "Create Merge Request"
* Wait for a developer to approve or reject the request.
== Quick Summary ==
There is more detail in the following sections, but here is a quick rundown of how one might submit a change for 1.2.x after making a repo clone above:
git clone git@rcs.pfsense.org:pfsense/myname-mystuff.git
# work, work, work, patch, patch, patch
git commit -a
# type a description for the commit


Revision [674]

Edited on 2009-02-24 22:19:43 by ChrisBuechler [remove note now that ssh is open to the world]
Deletions:
NOTE: SSH Access to rcs.pfsense.org is restricted by firewall to commiters only.


Revision [673]

Edited on 2009-02-24 05:09:52 by JimP [Clarify a little]
Additions:
NOTE: SSH Access to rcs.pfsense.org is restricted by firewall to commiters only.
Deletions:
NOTE: SSH Access to rcs.pfsense.org is restricted to commiters only.


Revision [672]

Edited on 2009-02-24 05:08:35 by JimP [Add a note about ssh being restricted.]
Additions:
NOTE: SSH Access to rcs.pfsense.org is restricted to commiters only.


Revision [658]

Edited on 2009-02-21 04:41:38 by ChrisBuechler [Add a note about ssh being restricted.]
Additions:
== Checking out pfSense's GIT repo anonymously ==
== Checking out pfSense's GIT repo with a rcs.pfsense.org account ==
Your SSH key must be available, as entered in Gitorious.
git clone git@rcs.pfsense.org:pfsense/mainline.git
Deletions:
== Checking out pfSense's GIT repo ==


Revision [574]

Edited on 2009-02-13 00:03:46 by BillM [Add a note about ssh being restricted.]
Additions:
To setup the initial tracking branch, you would do
Subsequent checkouts (or branch changing) will look like
git checkout RELENG_1_2
cd mainline
cd yourclone


Revision [551]

Edited on 2009-01-19 03:17:25 by GeekGod [Add a note about ssh being restricted.]
Deletions:
# XXX: How to switch back to master branch!?


Revision [550]

Edited on 2009-01-18 21:47:16 by GeekGod [Add a note about ssh being restricted.]
Additions:
cd mainline # cd into the repo.
git status
# On branch master - note that the default is "master" which is similar to HEAD in CVS speak.
Deletions:
cd mainline # cd into the repo. note that the default is "master" which is similar to HEAD in CVS speak.


Revision [549]

Edited on 2009-01-18 21:46:16 by GeekGod [Add a note about ssh being restricted.]
Additions:
cd mainline # cd into the repo. note that the default is "master" which is similar to HEAD in CVS speak.
Deletions:
cd mainline # cd into the repo


Revision [548]

Edited on 2009-01-18 21:34:40 by GeekGod [Add a note about ssh being restricted.]
Additions:
== How to push your local repo changes back to Gitorious ==
git push git@rcs.pfsense.org:pfsense/mainline.git


Revision [547]

Edited on 2009-01-18 21:31:54 by GeekGod [Add a note about ssh being restricted.]
Additions:
cd mainline # cd into the repo


Revision [546]

Edited on 2009-01-18 21:31:35 by GeekGod [Add a note about ssh being restricted.]
Additions:
== Checking out pfSense's GIT repo ==


Revision [545]

Edited on 2009-01-18 21:03:18 by GeekGod [Add a note about ssh being restricted.]
Additions:
# XXX: How to switch back to master branch!?


Revision [542]

Edited on 2009-01-17 19:12:45 by BillM [Add a note about ssh being restricted.]
Additions:
git config remote.origin.url git@rcs.pfsense.org:pfsense/mainline.git
git config remote.origin.url git@rcs.pfsense.org:pfsense/yourclone.git
Deletions:
git config remote.origin.push git@rcs.pfsense.org:pfsense/mainline.git
git config remote.origin.push git@rcs.pfsense.org:pfsense/yourclone.git


Revision [541]

Edited on 2009-01-17 06:10:09 by BillM [Add a note about ssh being restricted.]
Additions:
git config remote.origin.push git@rcs.pfsense.org:pfsense/mainline.git
git config remote.origin.push git@rcs.pfsense.org:pfsense/yourclone.git
Deletions:
%%git push origin%%


Revision [540]

Edited on 2009-01-17 06:02:12 by BillM [Add a note about ssh being restricted.]

No Differences

Revision [539]

Edited on 2009-01-17 06:01:57 by BillM [Add a note about ssh being restricted.]
Additions:
== Checking out RELENG_1_2 ==
git checkout -b RELENG_1_2 origin/RELENG_1_2
would look like:
(billm) pfsense-git$ git checkout -b RELENG_1_2 origin/RELENG_1_2
Branch RELENG_1_2 set up to track remote branch refs/remotes/origin/RELENG_1_2.
Switched to a new branch "RELENG_1_2"
(billm) pfsense-git$


Revision [532]

Edited on 2009-01-17 04:45:51 by BillM [Add a note about ssh being restricted.]
Additions:
# For small changes I prefer to rebase over pull as you likely haven't shared your changes
You'll clone the mainline pfsense repo in Gitorious, checkout whichever branch you need (we'll assume it's master here). We'll clone our Gitorious clone locally and setup a remote tracking branch for the mainline repo
# I like to separate the pull into a fetch and merge
git merge master
Deletions:
%%git commit%%
You'll clone the mainline pfsense repo in Gitorious, checkout whichever branch you need (we'll assume it's master here)
git rebase mainline


Revision [531]

Edited on 2009-01-17 04:39:34 by BillM [Add a note about ssh being restricted.]
Additions:
http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo
== How to keep your clone in sync with the mainline repo ==
[[http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo]] is a good doc to read on this
git fetch mainline
git merge mainline/master
Deletions:
== How to merge upstream changes into your clone ==
%%git remote add mainline http://gitweb.pfsense.org/pfsense/mainline.git%%
%%git fetch mainline%%
# Rebase our local repository off the mainline repository
# To test/understand, why rebase instead of pull or merge?
%%git rebase mainline/master%%


Revision [530]

Edited on 2009-01-17 04:33:22 by BillM [Add a note about ssh being restricted.]
Additions:
== Large changes requiring a clone ==
You'll clone the mainline pfsense repo in Gitorious, checkout whichever branch you need (we'll assume it's master here)
git clone http://gitweb.pfsense.org/pfsense/yourclone.git
git commit
# At some point you might wish to share your work before merging the mainline tree back in
# Finally ready to merge with the mainline
git remote add mainline http://gitweb.pfsense.org/pfsense/mainline.git
git rebase mainline
git push origin
Request a merge with mainline from the Gitorious screen


Revision [529]

Edited on 2009-01-17 04:06:05 by BillM [Add a note about ssh being restricted.]
Additions:
%%git remote add mainline http://gitweb.pfsense.org/pfsense/mainline.git%%
%%git fetch mainline%%
%%git rebase mainline/master%%
%%git push origin%%
Deletions:
git remote add mainline http://gitweb.pfsense.org/pfsense/mainline.git
git fetch mainline
git rebase mainline/master
git push origin


Revision [528]

Edited on 2009-01-17 04:02:40 by BillM [Add a note about ssh being restricted.]
Additions:
This doc is really meant for devs that have commit access to the mainline pfsense branch.
Generally it's a bad idea to work in the master branch. In git, master is the equivalent of CVS's HEAD, but branches are really easy to use and merge back into the HEAD branch. Also, because git is distributed, it's an easier workflow to keep the master branch (or whatever branches you share with the upstream repo) 'clean' and perform merge work in your topic branch.
== Small changes ==
For changes that are usually one file in nature and small bugfixes, you usually don't want to go through the effort of forking the repo, making changes, pushing and merging back to mainline.
You'll clone the mainline pfsense repo, checkout whichever branch you need (we'll assume it's master here)
%%
git clone http://gitweb.pfsense.org/pfsense/mainline.git
git checkout master
git branch patches
%%
# ...work...work...work
%%git commit%%
# work/commit as needed
# now we do the merge dance - switch back to master branch and update from the mainline repo
%%
git checkout master
git rebase origin
%%
# switch to our patches branch and merge in changes from master
%%
git checkout patches
git rebase master
%%
# fix any merge conflicts and commit
# now that our patches branch includes all upstream changes, we'll switch back to master, merge, and push
%%
git checkout master
git merge patches
git push
%%


Revision [525]

The oldest known version of this page was created on 2009-01-13 03:28:39 by BillM [Add a note about ssh being restricted.]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki