How to Begin a Project from the Current Expertiza Repository: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* [https://github.com/login Login] to [https://github.com/ Github] or create an account.
* [https://github.com/login Log into] [https://github.com/ Github] or create an account.
* Navigate to [https://github.com/expertiza/expertiza the Expertiza repository] and click the fork icon in the upper right corner [[File:Fork.jpg]]
* Set up Git on your development machine:
* Add an ssh key for Github on your computer if you have not already. <br /><code>ssh-keygen -trsa -C "your_email@example.com"</code>
** You may use either shell commands or a GUI for GIt. I recommend using the shell because the commands are the same cross-platform.
** Follow the instructions at the prompt. You can decide whether to set a password or not for the key.
*** [https://help.github.com/articles/set-up-git#platform-linux Linux]
** Copy the output of the following command and paste it into the new ssh key dialogue on Github: https://github.com/settings/ssh:
*** [https://help.github.com/articles/set-up-git#platform-mac Mac OS X]
<code>cat ~/.ssh/id_rsa.pub</code>
*** [https://help.github.com/articles/set-up-git#platform-windows Windows]
* Copy the URL of your forked repository
* Fork the Expertiza project
** It should be in the form: git@github.com:<Your Github Username>/expertiza.git
** [https://help.github.com/articles/fork-a-repo How To: Fork a Github Repository]
* On your development machine run:
* Make your changes, committing often, until your project is complete.
<code>git clone git@github.com:<Your Github Username>/expertiza.git</code>
* If you want more practice using Git and to help out the Expertiza team, you should merge the current upstream master branch back into your project before creating a pull request.
** The remote is the URL you copied earlier.
<pre>
* Now you are in the current Expertiza working directory!
git remote add upstream https://github.com/expertiza/expertiza.git #Add the upstream remote (expertiza/expertiza)
git fetch upstream #Get all current code from upstream
git merge remotes/upstream/master #Merge upstream with your current branch
</pre>
* Fix merge conflicts -- only keep parts of files that you have changed from your work. Everything else should be kept from upstream.
** Your code is HEAD, and upstream is a hash (e.g. 3a8fe31).
* Test the merged code to make sure the functionality of your project remains and nothing broke.
* Push your merged code to your forked repository<br>
<pre>
git push origin master
</pre>
* When you are finished, [https://help.github.com/articles/using-pull-requests create a pull request] so that your code can be easily merged into Expertiza
** Please create a pull request message detailing the changes you made in which files for your project.
** Include the year and semester as a comment in the pull request (e.g., Fall 2013).

Latest revision as of 01:00, 19 August 2013

  • Log into Github or create an account.
  • Set up Git on your development machine:
    • You may use either shell commands or a GUI for GIt. I recommend using the shell because the commands are the same cross-platform.
  • Fork the Expertiza project
  • Make your changes, committing often, until your project is complete.
  • If you want more practice using Git and to help out the Expertiza team, you should merge the current upstream master branch back into your project before creating a pull request.
git remote add upstream https://github.com/expertiza/expertiza.git #Add the upstream remote (expertiza/expertiza)
git fetch upstream #Get all current code from upstream
git merge remotes/upstream/master #Merge upstream with your current branch
  • Fix merge conflicts -- only keep parts of files that you have changed from your work. Everything else should be kept from upstream.
    • Your code is HEAD, and upstream is a hash (e.g. 3a8fe31).
  • Test the merged code to make sure the functionality of your project remains and nothing broke.
  • Push your merged code to your forked repository
git push origin master
  • When you are finished, create a pull request so that your code can be easily merged into Expertiza
    • Please create a pull request message detailing the changes you made in which files for your project.
    • Include the year and semester as a comment in the pull request (e.g., Fall 2013).