git: Push a local branch to a different remote branch

supermatter:

It took me a bit longer to figure this out than I thought it should, so I’m documenting it. If you need to push a local branch to a remote different branch, do this:

$ git push remote local_branch:remote_branch

A real world example: when pushing to our heroku based staging environment, I need to push my local staging branch to the remote master (since heroku will only deploy the master branch), I do this:

$ git push heroku_staging staging:master
8. February 2014
git

Most used command lines

$ history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl |  head -n10
     1	75  18.2927%   cd
     2	47  11.4634%   git
     3	44  10.7317%   ls
     4	43  10.4878%   mvn
     5	36  8.78049%   sudo
     6	17  4.14634%   nano
     7	17  4.14634%   export
     8	12  2.92683%   make
     9	11  2.68293%   clear
    10	10  2.43902%   rm

Snippet shows your most used commands…

(Source: be-jo.net)

28. January 2014



Error -2147415740 on OSX

OSX restricts the size of the keys that can be imported into the KeyChain app and instead of telling you what exactly the problem is it throws error codes back.

Thankfully, Tom Cramer found the solution in the Apple support forums, still I’m posting this as a reminder to myself.

Paste this into your terminal and change the key size accordingly if you have even bigger keys than me:

defaults write /Library/Preferences/com.apple.crypto RSAMaxKeySize -int 16384

Now restart the KeyChain App using Cmd+Q. After re-opening KeyChain your key should be accepted and be ready to be verified against.

19. January 2014