Tag: linux

When using php exec() to run shell scripts, one script works (which simply does git status) and one doesn't (which does git checkout). How come?

I am trying to setup a web-based portal through which we can checkout different branches of our Git repository through a simple click on a back-end panel. So currently, I have /var/www/devportal which contains index.php, status.sh and checkout.sh In index.php I do the following: $repo = $_GET[‘repo’]; $command = ‘sh status.sh ‘ . $repo; $output […]

how to sync a “shadow” git repository with a main repository “secretly”

I have a client that I do work for via a git repository. I do not want for him to know that I am partly using another developer. I have therefore created a “shadow” repository, that my developer is using. How to sync the “shadow” repository with the main repository so that the main repository […]

Using multiple Git repos inside folder with same top level parent directory?

I am working on a Magento store (SVN repo connected to Git) utilizing the fabulous HTML5 Boilerplate based Magento-Boilerplate theme (GitHub repo) and extending it with my own child theme (private Git Repo). These all exist in a single www folder which happens to be the top level directory for all three projects. I would […]

solution for GIT GUI client for remote SSH

I am a GIT GUI user. I have not issue using in my local development. However, now we have a server with GIT repo. I would like to know any solution I can remotely push, pull and diff by using GIT GUI client to access that? Currenly. I am SSH to the linux server, and […]

Git – fatal: Could not get current working directory?

When I git clone from a repo, I get, fatal: Could not get current working directory: No such file or directory What do I do? I have checked the server and found that .git file exists. The server is running a Gitlab instance. I have configured ssh properly with the keys, and I’ve been committing […]

Why does Git convert CRLF to LF on Linux?

I have some shell scripts that need to have LF line endings (I’m on Ubuntu 14.04). Since this is a cross-platform open source project, a .gitattributes file is used to make line endings work ‘automatically’. Unfortunately, they don’t. $ cat .gitattributes # automatically normalize line endings * text=auto I have the following file on my […]

git changes not reflected on remote repository

Ok, I configured a bare git for me and another person to use for a project. We have the git set up on a linux computer and it seems to have worked ok. He added a text file to the git on the linux computer. Then he cloned from his local machine over ssh and […]

Using 'git remote add origin' creates a global remote instead of one local to current directory/repo

Solution: Finally realized the problem. Stupid User Error. Forgot to run ‘git init‘ in the new project directory first. Hence, running ‘git add .‘, ‘git remote add origin repo.git‘ (or even the typo ‘git add origin repo.git‘) in a directory without a git repo, will revert to applying the command globally, hence all the parent […]

How to treat a local dotfile repository?

As many others, I want to have a git repository with my configuration files and also upload a backup of it to a hosting site. My question is how to treat the dotfiles of the local repo. Let’s say that I have my zshrc/bashrc in the dotfiles repo. I can put the line ‘source /path/to/local/repo/zshrc’ […]

GIT signed tags and passphrase

how can i make git auto enter my passphrase when i signed tags. is there an option like — passphrase “my long passphrase”, i did try using ssh-keygen but it did not help. the Repository is on local and everything is done locally.

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