Skip to content

Instantly share code, notes, and snippets.

View frontmesh's full-sized avatar
🏄

Vladimir Vujosevic frontmesh

🏄
View GitHub Profile
@frontmesh
frontmesh / git-push
Last active December 17, 2015 17:59
Sequence of a git commands for pushing commit to origin branch. Requires NodeJS to work. - git add . - git commit -am "" - git pull origin [current_branch] - git push origin [current_branch] chmod +x git-push sudo cp git-push /usr/bin/
#!/usr/bin/node
var sys = require('sys')
, exec = require('child_process').exec
, current_branch
, commit_message = process.argv[2];
function puts (error, stdout, stderr){
sys.print('stdout: ' + stdout);
sys.print('stderr: ' + stderr);
@frontmesh
frontmesh / gitmerge
Created May 15, 2013 15:42
Seqence of git merge commands for pulling and merging remote branches
#!/bin/bash
current_branch=`git branch|grep "*" | cut -d " " -f 2 `
target_branch=$1
if [ -z "$1" ]
then
echo "No target branch supplied"
else
`git checkout $target_branch`
@frontmesh
frontmesh / git-merge
Last active December 17, 2015 06:48
Git-merge as a bash script, requires nodejs for execution. Make this script executable chmod +x git-merge, than do a copy/move to /usr/bin "git-merge [branch]"
#!/usr/bin/node
var sys = require('sys')
, exec = require('child_process').exec
, current_branch
, target_branch = process.argv[2];
function puts (error, stdout, stderr){
sys.print('stdout: ' + stdout);
sys.print('stderr: ' + stderr);