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

1
vote
0answers
9 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
26 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 ...
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
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
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 ...
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
922 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
2k 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
66 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
30 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
64 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
63 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
7 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
23 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 ...
5
votes
1answer
3k views

How to create a git repo 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-...
2
votes
1answer
923 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
0answers
24 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
58 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
35 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
20 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
27 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
941 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
39 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
49 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
16 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
76 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
218 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
468 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
84 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
194 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
250 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
139 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/...
1
vote
2answers
36 views

How to get first 5 chars of a git commit hash id and store it in a variable in bash?

${$(git rev-parse HEAD):0:5} bash: ${$(git rev-parse HEAD):0:5}: bad substitution git rev-parse HEAD returns the hash id, but how do I make a substring out of it? if I divide it into two lines, it ...
2
votes
0answers
28 views

How to turn a git repo into a ppa

Suppose I have a git repo, the instructions for building are: sudo apt-get -y install build-essential git mesa-common-dev libglu1-mesa-dev libsdl2-dev libsamplerate0-dev cd ~ wget http://download.qt....
1
vote
1answer
37 views

Share a git repo over LAN

I would like to share some of my work with my colleagues. The whole company uses flavors of Debian Linux and is connected in a LAN network. I don't want to bug the administrator with access to the ...
11
votes
1answer
468 views

Remember password for ssh key for some time

I created ssh key. I use it to connect with git repositories. When creating the key, I noticed the prompt that said the password should be hard to guess. Therefore, I came up with 40+ characters-long ...
79
votes
7answers
118k views

GUI for GIT similar to SourceTree

Is there a similar piece of software to SourceTree, a GUI for git, for Linux? I know about Giggle, git cola, etc. I'm looking for a beautiful, easy to use GUI for git.
3
votes
1answer
50 views

zsh: Tab completion for function with Git commands

In zsh I am using the following function to delete a local and a remote branch with one command: gpDo () { git branch -d "$1" && git push --delete origin "$1" } Currently, auto-...
2
votes
2answers
52 views

using git to version-control any file edited with my text editor

Is there any way to integrate text editor (joe in my case) with git in such a way, that every change to any file is automatically committed in git (probably with a time stamp), so that I can always go ...
3
votes
0answers
5k views

Git hangs indefinitely when trying to push --all to GitHub

When I try and push --all to GitHub, the Git transfer starts out fast, slows down, and eventually stops. It doesn't fail, it just slows to a halt. What's going on? This is really frustrating, I'd ...
1
vote
3answers
1k views

What's the difference between `Commit hash`, `Parent Hash` and `Tree hash` in git?

Today I'm learning some basic git knowledge via reading this doc online: http://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-Hi And at that chapter, I'm start to learn using git log --pretty=...
2
votes
0answers
63 views

git push/pull with ssh key

I have a 'git --bare' repo on a linux machine. I wish to allow another user from a different machine to push/pull to it. I have their ssh key. Is there some way I can allow them to execute the ...
1
vote
1answer
29 views

How to allow `gitolite writable` to everyone?

I want for clients to be able to lock any branch (or at leas repository) to which they have write control. gitolite writable off seems to do just that. But I can't grasp the permissions. $ ssh git@...
1
vote
0answers
49 views

git-filter-branch leaving untracked files

I am trying to use git filter-branch to refactor a repository. I am trying to extract one directory from it. Since I am not familiar with the command, I have been experimenting with a copy of the ...
2
votes
2answers
68 views

How to find out which files are outside git repository

Suppose we have a directory with a git repository & files: .git /test/inside-1.txt /test/outside-1.txt outside.txt inside.txt "inside" files are within git repository, "outside" are not. I'd ...