Tag: bash

Are renamed folders tracked by Git?

I renamed a folder and it is no longer tracked by git. I checked the remote repo that I push to and oddly the folder with the new name is there but there are no contents. I checked my .gitignore just out of diligence, and there is nothing that says to ignore the contents of […]

How do I completely uninstall git from my Linux Machine

I had installed git by downloading the tar ball and then doing the following steps ./configure –prefix=/scratch/custom/git make make install But after running these commands, I still see that git is created under /usr/local as below bash-4.1$ whereis git git: /usr/bin/git /usr/local/git /usr/share/man/man1/git.1.gz I would like to remove and reinstall again how do i do […]

How to deal with file names which contain spaces in Ruby(In Git Bash)

I encounter a problem about running some Git commands which contain white spaces in file names with Ruby, like: aaa = “xxxxxxx/xxxx/BOM\ Explosion.txt” `git update-index –assume-unchanged — #{aaa}` or aaa = “xxxxxxx/xxxx/BOM Explosion.txt”.shellescape `git update-index –assume-unchanged — #{aaa}` I have tried either way above to escape space and run it in Git Bash, but neither […]

Symbolically linking files inside a git subdirectory

I have a question regarding git. I may be completely off base here with how I’m even approaching the questions, so I would be glad to hear a completely differing opinion of how to get this done. I keep a handful of python and bash scripts in a folder I upkeep called utils. It has […]

Git Initial Push Bad File Descriptor Error

I am new to git and have been following various tutorials on setting up a centralized git server. For the past few days, I have been having trouble with the following error message: Counting objects: 59, done. Delta compression using up to 2 threads. Compressing objects: 100% (59/59), done. Writing objects: 100% (59/59), 525.33 KiB […]

Git not recognizing alias

My .gitconfig file is as follows: [user] name = myname email = asdf@xyz.com [alias] co = commit -am When I’m in Git Bash and I enter: git co “Macro changes” I get this error message: git: ‘co’ is not a git command. Why isn’t the alias being recognized? EDIT: I’m running Windows 7. The .gitconfig […]

Fastest way to merge branches via gitlab (or git)?

I have a development branch and a production branch. I push changes from my development server to a remote gitlab install. Then I login to gitlab GUI and do a merge request (which is quite time consuming). Then I “git pull origin production” from my production server. The merge request step kind of takes a […]

Cannot implement git version control on R-Studio (Version Control System: NONE)

I’m trying to put a project under version control in R-Studio. I have installed git and everything is working from the git bash command-line. However, when I go to Tools >> Version Control in R-Studio, it says “None” under “Version Control System.” I have attached a screenshot here: http://i.imgur.com/Arc12GG.png Does anybody know how to fix […]

Ruby use stdin twice

In continuum to this question I have a git hook written in ruby. I want to use the input from stdin twice. I have two of the same type (post-receive) of git hooks, and want them both executed as if they were called by git. The first hook is in ruby, and is the default […]

Pre-push Git hook to determine if branch name is valid

I want to write a Bash script to test a regex against a branch name with a Git pre-push hook. I have read the pre-push documentation but I am having trouble getting the hook into my application. Anyone have any suggestions. local_branch = $(git rev-parse –abbrev-ref HEAD) valid_chars = $(^[a-z0-9-]+$) if [[ “$local_branch” =~ valid_chars]]; […]

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