Set a Default Push Remote with git
During my early days of git usage, my config allowed me to simply type git push
instead of git push {origin} {branch_name}
which I need to now. Up until recently I needed to type out the long version...(I know)...which was incredibly annoying because I like using detailed branch names.
I'd finally had enough of the copy and paste branch name madness and decided I wanted git push
to always push to my origin and the same branch name:
git config --global push.default current
There are a number of push.default
values you can use but in most cases, especially when you have a GitHub workflow, current
is likely the value you want to use. Also, since we're using --global
, this will be the default for all repositories!
![Detect DOM Node Insertions with JavaScript and CSS Animations]()
I work with an awesome cast of developers at Mozilla, and one of them in Daniel Buchner. Daniel's shared with me an awesome strategy for detecting when nodes have been injected into a parent node without using the deprecated DOM Events API.
![9 More Mind-Blowing WebGL Demos]()
With Firefox OS, asm.js, and the push for browser performance improvements, canvas and WebGL technologies are opening a world of possibilities. I featured 9 Mind-Blowing Canvas Demos and then took it up a level with 9 Mind-Blowing WebGL Demos, but I want to outdo...
![Create a Simple Slideshow Using MooTools, Part II: Controls and Events]()
Last week we created a very simple MooTools slideshow script. The script was very primitive: no events and no next/previous controls -- just cross-fading between images. This tutorial will take the previous slideshow script a step further by:
Adding "Next" and "Previous" controls.
Adding...
![CSS Sprites]()
The idea of CSS sprites is pretty genius. For those of you who don't know the idea of a sprite, a sprite is basically multiple graphics compiled into one image. The advantages of using sprites are:
Fewer images for the browser to download, which means...
Thanks for sharing, David. That’ll save me considerable time.
Love this one ! Thank you for sharing.
For anyone who doesn’t want to set it local, you can also do git push origin –set-upstream per your local branches: https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches
How do you set the default for pull? For an open source fork I have, I want
git pull
to default togit pull upstream special-dev-branch
?I’d second Devin Rhode’s question