# GitHub workflow basics

**URL:** <https://forum.ansible.com/t/github-workflow-basics/18026>\
**Category:** Ansible Developer\
**Created:** [April 20, 2015, 7:49pm UTC](https://forum.ansible.com/t/github-workflow-basics/18026 "2015-04-20T19:49:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony\_Yarusso](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@Tony\_Yarusso](https://forum.ansible.com/u/Tony_Yarusso)\
**Post date:** [April 20, 2015, 7:49pm UTC](https://forum.ansible.com/t/github-workflow-basics/18026/1 "2015-04-20T19:49:39Z")

</div>

Hi, I’m trying to get a handle on how GitHub is used. Do people normally create a separate branch of every issue they want to work on, or is there some way to specify which individual commits to include in a pull request? I figured out how to fork the repo, commit changes for one issue, and create a PR for that, but now I want to work on a second issue and I’m not sure how to do that without including the not-yet-accepted changes from the first issue.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 20, 2015, 8:11pm UTC](https://forum.ansible.com/t/github-workflow-basics/18026/2 "2015-04-20T20:11:13Z")

</div>

Generally speaking, you create a new topic branch for ever feature that you are working on.

No work should ever be done directly off of devel, create your topic branches off of devel and do your work there. If there is an already open issue for what you are working on, it’s common to name your branch something like ‘issue/12345’

I do something like:

git checkout devel  
git fetch upstream  
git merge upstream/devel  
git checkout -b some-new-branch  
git add something  
git commit -m “Some commit”  
git rebase -i upstream/devel  
git push

I don’t normally run those all at the same time, but those are some common things that I do.

---

<div class="post-metadata">

**Author:** ![willthames](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@willthames](https://forum.ansible.com/u/willthames)\
**Post date:** [April 21, 2015, 1:14am UTC](https://forum.ansible.com/t/github-workflow-basics/18026/3 "2015-04-21T01:14:54Z")

</div>

Yep, agreed.

Michael Dehaan has written a recent blog post on the merge/rebase element of this.

[http://michaeldehaan.net/post/116465000577/understanding-when-to-use-git-rebase](http://michaeldehaan.net/post/116465000577/understanding-when-to-use-git-rebase)

To answer the original question, assuming you were working on a new feature called feature1 in branch feature1 and want to write a new feature feature2 without including what’s in feature 1 you can just do

git fetch upstream  
git checkout -b feature2 upstream/devel

If you then need to merge upstream changes into your feature1 branch, that’s when you’d do

git checkout feature1  
git pull --rebase upstream devel

Will
