Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

learn more… | top users | synonyms

2
votes
2answers
4k views

Git pull error libcurl.so.3 not found

I have a php script to git pull from my github repository set up in my webservice hook urls like so: <?php echo shell_exec('~/git/usr/bin/git pull 2>&1'); ?> When I open this script ...
-1
votes
1answer
20 views

Using git push to create remote branch on the fly without creating local branch [on hold]

So here is what i want to achieve: When I clone a repository from Github and checkout some stable branch, and make some local changes in it, then I don't want to create a local feature branch nor do ...
0
votes
1answer
15 views

upload ssh key on github from command line

I have found a way to upload an SSH key to my GitHub account with command line, but there is small problem. I am able to do this with following command: curl -u "user:pass" --data '{"title":"test-...
0
votes
2answers
36 views

Unable to clone git repository on ubuntu [closed]

While cloning git repository I am getting the following error Failed to connect to github.com port 443:Network is ureachable while I am able to clone on my windows machine Edited- git clone https:/...
0
votes
0answers
39 views

can not add key to ssh agent with ssh-add, because it asks for a pass-phrase

I just generated an SSH key, without a passphrase, to run some scripts that pull files from GitHub. However, I was having issues so I ran ssh -vT git@github.com which according to the debug statements ...
1
vote
2answers
39 views

inaccessible directory

I git cloned into a directory "/source" before I mkdired it. It did not show up in its parent directory, but when I run the ls command, the output is indented like this: database static ...
3
votes
2answers
2k views

SSH Agent Forwarding on server

I'm struggling with the concept of SSH Agent Forwarding. This is what I've done so far: Create default identity local (ssh-keygen) Install the public key on bitbucket Now I want to connect to a ...
115
votes
5answers
50k views

How to colorize output of git?

Is there a way to color output for git (or any command)? Consider: baller@Laptop:~/rails/spunky-monkey$ git status # On branch new-message-types # Changes not staged for commit: # (use "git add &...
2
votes
1answer
360 views

“X11 forwarding request failed” when connecting to github.com

I'm getting a bizarre error message while using git: $ git clone git@github.com:Itseez/opencv.git Cloning into 'opencv' Warning: Permanently added the RSA host key for IP address '192.30.252.128' to ...
3
votes
0answers
42 views

Tar - Transform stdin without extracting

I am attempting to transform the paths of a tar file coming from standard input without having to extract the tar first. This is an apparent duplicate of this question, I am looking for a solution ...
0
votes
1answer
19 views

git retains remote information from a deleted repository

I cannot clone any repository anymore. $ git clone git@bitbucket.org:myaccount/myrep.git Cloning into 'myrep'... conq: repository does not exist. fatal: Could not read from remote repository. ...
0
votes
0answers
20 views

Clone git repo via ssh'ing from another pc

How can I clone git repos in a non-interactive way as follows: for h in server1 server2; do ssh $h "git clone git@gitlab.com:username/reponame.git" done When I interactively clone the ...
3
votes
1answer
956 views

sudo -u git clone

I'm on Ubuntu server 14.04. I am using apache web server which runs as the www-data. I need to do git clone from a script (a web hook). This script will run with www-data user privilages. Running ...
0
votes
1answer
1k views

gitweb.cgi: “Premature end of script headers: gitweb.cgi”

I'm running LAMP on Arch and now want the gitweb going on apache. Followed the instructions as in https://wiki.archlinux.org/index.php/Gitweb but on the gitweb directory (here localhost/~myuser/gitweb)...
2
votes
1answer
2k views

How do I restart apache as non-root (using a git-hook)?

For one specific user I want to be able to restart Apache. This user does have sudo privileges and I could run sudo /etc/init.d/apache2 reload, but I want to include this restart script in a git post-...
5
votes
1answer
3k views

How to publish a git repo via HTTP using nginx?

I've a CentOS 5 server at domain.fr. I am trying to set a subdomain so that I can use it with git : git.domain.fr My repositories are in /home/git (example /home/git/repos.git) I've installed git-...
1
vote
2answers
106 views

Why do I need 3 git repositories for ikiwiki if I want to commit locally

If I have a local ikiwiki on my laptop I need a "repository" directory (mywiki.git - a bare repository), a "scrdir" (myiki a git repository) and a place where the produced html files go ("destdir") to ...
3
votes
1answer
227 views

Fetching all Git repositories in the background

I'm thinking about setting up a cronjob for fetching all my repositories every once in a while, to have the current status ready in case I'm offline. Something like the following (wrapped for better ...
1
vote
0answers
11 views

How did I get the git commits to show up in autocomplete?

Git tab completion on my mac: Git tab completion on my Ubuntu server: On my mac and my Ubuntu server I get very different output from tab completion despite having the same version of zsh, same ...
2
votes
1answer
32 views

Have tree hide gitignored files

Is there a way to make tree not show files that are ignored in .gitignore? Thanks!
0
votes
1answer
2k views

Allow www-data to perform specific commands

I need a PHP script to perform git pull however I am not naive enough to give it permissions on git. I've wrapped git pull in a script which www-data has permissions for, but I'm not sure how to give ...
1
vote
1answer
29 views

Why you cannot `git pull SHA…650839#file-diff.pach`?

I want to download a portion of this diff: https://gist.github.com/sergeykish/650839#file-dvorak-de-diff. Pseudocode git pull https://gist.github.com/sergeykish/650839#file-dvorak-de-diff.patch
0
votes
0answers
11 views

Attempt to push to remote repo failed, Hooks at play

Our GIT server was moved to another location, and since then every push for any repository is getting rejected. To get around I could disable the reject-merge-commit-hook, but that is not good. I ...
2
votes
4answers
1k views

How to install latest git on Debian 8?

I have some problems with git-lfs and I think that upgrading to the latest git can fix this problems. Current version of git in Debian is 2.1.4, current stable version on official site is 2.6.4. Can I ...
3
votes
2answers
3k views

Is there a way to prevent git from changing permissions and ownership on pull?

Everytime I do git pull or git reset, git resets changes to permissions and ownership I made. See for yourself: #!/usr/bin/env bash rm -rf 1 2 mkdir 1 cd 1 git init echo 1 > 1 && git add ...
0
votes
1answer
84 views

Why I cannot purge mono-devel on Ubuntu Linux 16.04?

After I sudo apt-get install mono-devel , when I try to purge mono-devel on Ubuntu Linux 16.04, I get the following error message: Reading package lists... Done Building dependency tree ...
1
vote
1answer
34 views

Does anyone know a surefire way of installing git on Solaris 9?

I tried the OpenCSW method but I am afraid that is only Solaris 10 and 11. git command just yields command not found. Surely someone out there has configured/used git on Solaris 9.
0
votes
1answer
83 views

ssh/git does not use GUI to ask for password after upgrade to to Ubuntu 16.04

I used to run Ubuntu 14.04 on my computer. Whenever I used ssh keys to log in to various servers, I used to get a GUI pop-up dialog asking me for the password for my key. After entering the password ...
2
votes
3answers
73 views

Problem with sudoing ssh - `sudo ssh …` fails

I am trying to use git salt ssh access (which runs with root). The error is always: Permission denied (publickey). I managed to reproduce the problem, simulating what salt may be doing, by ...
0
votes
0answers
16 views

Git + Nginx - Is it safe to have https auth for cloning and pushing to repo, while remove any auth from gitweb block?

I have following nginx configuration on Ubuntu 14.04 to use together with git httpd backend and gitweb to anonymous browse of repo and push/clone with authentication. Is it safe to use such or I ...
0
votes
0answers
29 views

Get rid of ksshaskpass in KDE Plasma (Fedora 23)

I'm using Fedora 23 with KDE 5 Plasma. I'm new with KDE, and I'm still setting up the environment so it can fit me. I recently used a git command, which asked for my github credentials - but instead ...
0
votes
0answers
26 views

git does not work for some repo but work for others

I encountered a very weird issue for git. I have three repo.s in github, say repo1, repo2 and repo3. On machine 1, I used to be able to clone and pull all three repos. However, suddenly I couldn't ...
0
votes
0answers
95 views

Why I can't open the kernel git repo in my GIT GUI client?

I successfully cloned the kernel using git in command line, nevertheless I find difficult to navigate throughout the repo using the cli and I got a gui client, gitkraken to be specific. The thing ...
4
votes
0answers
36 views

Git with multiple users on other systems using setfacl?

I'm setting up a git environment where multiple developers will work with per project. We have 1 server running git, and 2 seperate servers, 1 live and 1 dev. on dev I created a group and added the ...
7
votes
3answers
2k views

Git based package manager/installer for Linux

Is there any linux distro that has a git based package manager/installer. I want something similar to FreeBSD Ports (which is CVS based, I think) or Mac OS X Homebrew (git based).
0
votes
1answer
27 views

Git Daemon not using specified base-path

I have the following configuration in /etc/xinetd.d/git # description: The git server offers access to git repositories service git { disable = no type = UNLISTED ...
0
votes
1answer
30 views

Why does git wrap my log output in quotes?

If I used the following command: git log --pretty=format:"%ad %s%d" the output is: Tue Apr 26 11:29:24 2016 +0000 Updated configuration If I do the following: SIMPLE='--pretty=format:"%ad %s%...
3
votes
1answer
1k views

how to use ~/.ssh/config with Windows/PuTTY? [closed]

How can I use ~/.ssh/config with Windows/PuTTY? Are PuTTY settings stored in the registry? I wish to have my PuTTY settings in git. So it needs to be a human readable text file.
1
vote
1answer
43 views

How to backup files in multiple directories with git?

The example below is simplified to show the core of the problem, not the problem itself(my file tree is more complicated than that). Let's say that I have two files I want to back up; one in ~/...
3
votes
3answers
57 views

Conditional PS1

I'm basically trying to make my PS1 look like this when in a git repo: $ ~/Projects/Blah (master): Or if I'm not in a Git repo, I want it to look like this: $ ~/Projects/Blah: This is my current ...
2
votes
1answer
24 views

How to replay Git repository history into subdirectory?

Let's say I've got two repositories aye and bee and I want to get rid of bee, in such a way that the linear history of bee/master is "replayed" in a new subdirectory (several levels deep) of aye. I ...
0
votes
1answer
99 views

Debian git error: undefined symbol: __gmpn_cnd_add_n

$ sudo apt-get install git $ git clone sth Cloning into 'a-folder'... git-remote-https: symbol lookup error: /usr/lib/x86_64-linux-gnu/libhogweed.so.2: undefined symbol: __gmpn_cnd_add_n ...
0
votes
2answers
225 views

md5sum check fails for git-man-pages.tar.gz package

When I try to verify the integrity of git-man-pages package I downloaded from "http://code.google.com/p/git-core/downloads/detail?name=git-manpages-1.8.4.tar.gz&can=2&q=" it fails with error. ...
4
votes
5answers
502 views

Can I display GIT in prompt when current directory has a .git folder?

Can I display GIT in prompt when current directory has/contains a .git folder? Is there a way to do this? My current prompt is defined like so: export PS1="[\u@\h] \w $ " So, my prompt looks ...
1
vote
2answers
43 views

Detect and remove empty directories from list

A common problem game developers have with the Unity3D engine and Git is that Unity and Git fight for whether an empty directory should exist or not - Git doesn't care, Unity3D will keep making git ...
1
vote
3answers
95 views

Git Backup /home with other repos inside it

I'm trying to make an automated backup of my /home directory. In theory this is simple by running this in a cronjob: cd /home git add . git commit -m "nightly backup" git push where push will push ...
3
votes
1answer
3k views

How to fix “Hunk #1 FAILED at 1 (different line endings)” message?

I am trying to create a patch with the command git diff sourcefile >/var/lib/laymab/overlay/category/ebuild/files/thepatch.patch when I apply the patch, it gives me $ patch -v GNU patch 2.7.5 ...
0
votes
0answers
252 views

Where in CentOS 7 should I install Ruby?

I am installing Ruby and rbenv on a CentOS 7 by following the instructions in this tutorial, with modifications. One of the recommended lines of code is cd followed by git clone commands. I assume ...
1
vote
3answers
301 views

Pipe filelist into 'git add'

I performed a fresh clone and copied/pasted a working directory into the cloned directory. Now have a list of changed files: $ git status --short | grep -v "??" | cut -d " " -f 3 GNUmakefile Readme....
10
votes
1answer
151 views

Display only relevant hunks of a diff/patch based on a regexp

git log -G<regex> -p is a wonderful tool to search a codebase's history for changes that match the specified pattern. However, it can be overwhelming to locate the relevant hunk in the diff/...