---
# System prepended metadata

title: Github development cicle
tags: [' upstream', github]

---

---
title: Github development cicle
tags: github, upstream
---

### Start devel cycle
~~~sh
# Clone the fork
clone git@github.com:iranzo/openshift-ansible.git

# Get into the folder
cd openshift-ansible

# Add remote 'upstream' link

git remote add upstream git@github.com:openshift/openshift-ansible.git


# Create a new branch
git checkout -b test123

# Compare and peform changes

git diff
git add pablo.txt 
git status
git add requirements.txt 
git status
git commit -m "Pablo is testing"

# Push changes upstream (to our own fork)
git push

# It fails because there's no yet a 'test123' branch
# Set push + branch

git push --set-upstream origin test123
~~~

### Repeat development cycle
~~~sh
git checkout master
# Create a new branch
git checkout -b anothertest

# Work on changes
~~~

### Unit testing
 - Install `pip` command
     ~~~sh
     sudo yum install python-pip
     ~~~
 
 - Install `pipsi` automated virtualenv manager
     ~~~sh
     sudo pip install pipsi
     ~~~
 - Use pipsi to install tox
     ~~~sh
     pipsi install tox # ensure that `.bin/` it's in your `$PATH`
     ~~~
- run `tox`
 
 ### Create the PR
 At  <https://github.com/openshift/openshift-ansible/compare/master...iranzo:test123?expand=1>
 
 We have a form to compare 'master' and our 'fork' so that we can request the merge into upstream repo.
 