# Github pages - send updates to the right branch

**URL:** <https://talk.jekyllrb.com/t/github-pages-send-updates-to-the-right-branch/1631>\
**Category:** Uncategorized\
**Created:** [March 25, 2018, 1:25am UTC](https://talk.jekyllrb.com/t/github-pages-send-updates-to-the-right-branch/1631 "2018-03-25T01:25:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrtunes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mrtunes/32/885_2.png) [@mrtunes](https://talk.jekyllrb.com/u/mrtunes)\
**Post date:** [March 25, 2018, 1:25am UTC](https://talk.jekyllrb.com/t/github-pages-send-updates-to-the-right-branch/1631/1 "2018-03-25T01:25:35Z")

</div>

I followed instructions which suggested that your site has to live in the gh-pages branch. when doing a git push it seemed to be updating into the master though.

here are the commands i was doing:  
git add .  
git commit -m “myupdate”  
git push

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [March 25, 2018, 7:13am UTC](https://talk.jekyllrb.com/t/github-pages-send-updates-to-the-right-branch/1631/2 "2018-03-25T07:13:16Z")

</div>

GitHub no longer requires that your site live in the `gh-pages` branch… `master` branch will do fine as well…  
Even still, if you wish to push commits to the `gh-pages` branch then simply use the following command:

```auto
git push origin gh-pages

```

where `origin` refers to the name of your remote handler.  
To show a list of currently configured remote handlers, simply run the following:

```auto
git remote -v

```

---

<div class="post-metadata">

**Author:** ![mrtunes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mrtunes/32/885_2.png) [@mrtunes](https://talk.jekyllrb.com/u/mrtunes)\
**Post date:** [March 25, 2018, 10:40am UTC](https://talk.jekyllrb.com/t/github-pages-send-updates-to-the-right-branch/1631/3 "2018-03-25T10:40:55Z")

</div>

ok great thanks that worked. If I understand this correctly, every time I want to publish a new post, I have to run the git add, commit and push cycle to update the site?

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 25, 2018, 4:34pm UTC](https://talk.jekyllrb.com/t/github-pages-send-updates-to-the-right-branch/1631/4 "2018-03-25T16:34:07Z")

</div>

yes if you are doing it locally.

You could also do it on the GH site itself. Then you have to remember to git pull the next time you do it locally to pull down the changes you don’t have.

---

<div class="post-metadata">

**Author:** ![mrtunes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mrtunes/32/885_2.png) [@mrtunes](https://talk.jekyllrb.com/u/mrtunes)\
**Post date:** [March 25, 2018, 5:24pm UTC](https://talk.jekyllrb.com/t/github-pages-send-updates-to-the-right-branch/1631/5 "2018-03-25T17:24:56Z")

</div>

ok great, thanks for the help 👍
