Tag: bash

auto uploading from openshift rhc to github?

I need to one bash code witch automatically upload one folder to github.com site from Openshift RHC Servers. So i added the SSH key of openshift RHC to Github successfully. and i could insert one folder entire to Github server manually by this codes: echo “# openshift-test23” >> README2.md git init #git add README2.md git […]

Git Bash “help” commands but prevent usage of browser

I want to do git log –help but I don’t want the annoying “browser” to pop up. I just want the syntax listing right within Bash. Like when i type git -?, I get: Unknown option: -? usage: git [–version] [–help] [-C <path>] [-c name=value] [–exec-path[=<path>]] [–html-path] [–man-path] [–info-path] [-p | –paginate | –no-pager] [–no-replace-objects] […]

Bash scripting git branch lists

This is probably a dumb mistake. I am using this as a basis for a bash function to try to create a bash script for this git function: branch() { if [[ $@ == “-r” ]]; then command for k in `git branch -r | perl -pe ‘s/^..(.*?)( ->.*)?$/\1/’`; do echo -e `git show –pretty=format:”%Cgreen%ci […]

What solutions exist for lightweight version control of an entire system image?

Say you’re building a safety-critical software appliance to run on a capable embedded system like the NVIDIA Jetson TK1. The main application will run in Linux, and that is managed with Git. But you also want to have tight control over the entire system state – changes to the network settings, startup, shared libraries, etc. […]

Symlink not maintaining actual link in git

I have a bash file which quite simple has the following: /root/git-bin/create-hook-symlinks.sh #!/bin/bash HOOK_NAMES=”pre-commit” ROOT=$(git rev-parse –show-toplevel) # assuming the script is in a bin directory, one level into the repo HOOK_DIR=$ROOT/.git/hooks CUSTOM_HOOKS_DIR=$ROOT/git-bin/git-hooks # make sure the hooks are executable chmod +x $CUSTOM_HOOKS_DIR/* for hook in $HOOK_NAMES; do # If the hook already exists, is […]

Prevent Gulp Spawn Child Process Error On Exit Due to Grep Not Finding Match

Using child_process and Gulp 4 with git guppy I’m spawning a child process in a task in response to git hooks that runs a small bash script. BASH SCRIPT #!/usr/bin/env bash changed_files=”$(git diff-tree -r –name-only –no-commit-id ORIG_HEAD HEAD)” added_files=”$(git diff-tree -r –name-only –diff-filter=AR –no-commit-id ORIG_HEAD HEAD)” check_run() { echo “$changed_files” | grep –quiet “$1” && […]

git grep and xargs in Windows Batch file?

I am trying to create a Windows friendly .bat implementation of the following .sh script. The top few lines are all fine, just add SET and cd is fine. git grep is fine, however, xargs isn’t… What would the git grep | xargs logic look like in .bat ? INFINITY=10000 TOPDIR=$(pwd) METEOR_DIR=”./code” cd “$METEOR_DIR” # […]

Can't get Gulp to work on Git Bash

So I’m new in all this git ambient, I’ve been trying to learn JavaScript and as part of the course/book I’m following I have to use Git and Gulp, but I’ve been having trouble getting the local Gulp to work: $ gulp module.js:442 throw err; ^ Error: Cannot find module ‘C:\Program Files\Git\node_modules\gulp\bin\gulp.js’ at Function.Module._resolveFilename (module.js:440:15) […]

Random tag applied to every git commit

Background: Docker Hub allows for autobuilding of images by pointing to Github and building on either- commit made to a specific branch name commit made with a specific tag name Docker Hub also doesn’t allow for versioning of images with the same tag, meaning that if an image is build with tag :version_1, and later, […]

Git clone using ssh has a timeout

Hi guys I would just like to share some of my problem on git. I have been cloning on different unit and all of them were successful. But now I have encounter on a unit that would not let me clone or even pull. here is there error: ssh: connect to host port 22: Connection […]

Git Baby is a git and github fan, let's start git clone.