How to Push to a Git Remote Branch of a Different Name
Git is one of those tools that I've always known just enough about to be dangerous, and usually tend to learn new skills when I'm in a position to truly need them. Shockingly enough it has taken me roughly 15 years of using git for me to encounter the need to push to a remote branch name whose name is different than my local branch. Of course, you can thank gh-pages
for this occurrence.
Pushing to a remote branch of a different name than the local branch is as easy as a :
:
# git push {remote} {local_branch_name}:{remote_branch_name}
git push origin gh-pages-wip:gh-pages
For the first time in my career I'm needing to push to the same branch, other than master, from multiple branches at one time. A sensitive branch like gh-pages
will do that to you. Happy coding!
![Being a Dev Dad]()
I get asked loads of questions every day but I'm always surprised that they're rarely questions about code or even tech -- many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes...
![Create a CSS Cube]()
CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a language capable of creating deep, creative visuals. Add animation and you've got something really neat. Unfortunately each CSS cube tutorial I've read is a bit...
![Flext: MooTools Auto-Growing Textrea Plugin]()
A while back David Walsh published a list of
7 MooTools Plugins You Should Use on Every Website
which included 'AutoGrow' a text area expander plugin. 'AutoGrow' is very similar in results to the class I wrote for Education.com, Flext. I decided to release this...
![Create Twitter-Style Dropdowns Using jQuery]()
Twitter does some great stuff with JavaScript. What I really appreciate about what they do is that there aren't any epic JS functionalities -- they're all simple touches. One of those simple touches is the "Login" dropdown on their homepage. I've taken...