Skip to content
Erik Plestenjak edited this page Dec 12, 2013 · 7 revisions

Step by step guide for git in terminals:

  1. First thing you have to do is fork this repository. This is done on the github website. Navigate to eestec's repo and click the green button "Fork". This will copy eestec's repo to your acc on github.

  2. Clone it to your localhost. git clone https://github.com/USERNAME/eestec.portal-2.git

  3. Setup the "upstream" and "origin". These are the names where links to your repos will be saved. The upstream should point to eestec's repository, and origin should point to your forked one. As you cloned the repo "origin" is already pointing to your repo. Here is how you add "upstrem": git remote add upstream https://github.com/eestec/eestec.portal-2.git Check the current settings git remote -v

  4. check for any updates: git checkout master git fetch upstream git merge upstream/master

  5. Create your very first branch. Branch is the seperate workspace you will code in! git checkout -b BRANCHNAME you can chose your branch name. Usualy we name it after what we will be working on i.e. page_event_types

  6. Code is on your computer. You have a branch. This is the part where your talent comes in. Work on the code you've just copied!

  7. Do regular commits in case you crash your code, so you have a safe backup git commit -am 'your note'

  8. You've tested and fixed the errors. its time to upload. type git status to check what you have changed and git add FILENAME add the files.

  9. Commit changes you've made. In comments write what does the new code do! git commit-m "COMENT YOUR CHANGES"

  10. Merge your branch with the upstream/master. git fetch upstream git merge upstream/master. In case of problems use git mergetool.

  11. Its time to push files online. On your branch.(origin) git push origin -u BRANCHNAME this is the time where you type your Usernme and Pass. from Github

  12. Go to your acc on GITHUB website and "Send pull request" Dont forget to add coments about testing your code!

THIS IS IT! You've just finished the basic part! CONGRATZ! Now wait for admins to look on your work. Relax!

Next time when you want to start working on a new task:

Go to step 5 above!

CONGRATZ! you're killin' it! :)

Clone this wiki locally