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!
I spent a few months experimenting with different approaches for writing simple, elegant and maintainable media queries with Sass. Each solution had something that I really liked, but I couldn't find one that covered everything I needed to do, so I ventured into creating my...
David asked me if I'd be up for a guest post picking out some of my favorite Pens from CodePen. A daunting task! There are so many! I managed to pick a few though that have blown me away over the past few months. If you...
I was recently redesigning my website and wanted to create tooltips. Making that was easy but I also wanted my tooltips to feature the a triangular pointer. I'm a disaster when it comes to images and the prospect of needing to make an image for...
I recently received an email from a reader who was really impressed with Block Clickable, a jQuery script that took the link within a list item and made the entire list item clickable. I thought it was a neat script so I...