Sitemap
Daniel Blanco Rojas

Daniel Blanco Rojas

Entrepreneur, Ruby on Rails developer, Vim Fan and Art hobbyist!

GIT tip

1 min readMay 18, 2016

Working in one ticket for my own project I noticed that I committed my code to my local master branch.

Get Daniel Blanco Rojas’s stories in your inbox

Join Medium for free to get updates from this writer.

I never commit/push directly to master branch, so this is what I did:

git checkout -b newbranch

Create a new branch from master, this will copy the committed work to my new branch.

git push

This will update remote with my new branch data.

git checkout master
git reset --hard origin/master

And checkout master and make it the same as remote.

--

--

Daniel Blanco Rojas
Daniel Blanco Rojas

Written by Daniel Blanco Rojas

Entrepreneur, Ruby on Rails developer, Vim Fan and Art hobbyist!