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
1answer
10 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 ...
-1
votes
0answers
15 views

How to show git a list of repositories or dependencies? [on hold]

Is that possible to do that? If so, thanks. Note: I have Lubuntu 15.10 (which is derivative of distribution Ubuntu)
0
votes
1answer
30 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
209 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. ...
2
votes
1answer
854 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 ...
4
votes
5answers
422 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
40 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
52 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
0answers
43 views

Permission denied when accessing SSH server

So, a little background. I'm trying to host my own git server, and I decided to use SSH to log into it. I started two days ago, trying to configure SSH, to no avail. I'm hosting the server on my home ...
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 ...
2
votes
1answer
2k 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
101 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 ...
2
votes
2answers
1k 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 ...
1
vote
3answers
160 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 ...
9
votes
1answer
122 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 ...
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 ...
1
vote
2answers
28 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
21 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 ...
1
vote
1answer
34 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
446 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 ...
71
votes
7answers
109k 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
33 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, ...
2
votes
2answers
48 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
4k 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
966 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 ...
2
votes
0answers
48 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
23 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 ...
1
vote
0answers
44 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
58 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 ...
3
votes
2answers
71 views

Crontab shell script git pull and forever start

I'm trying to set up a Raspberry Pi to check a repo on startup and then fire up a node script with forever. I got the second part working, but I tried a dozen git commands with no success. Here is ...
1
vote
0answers
14 views

How to pipe bash completion suggestions? [duplicate]

I am trying to save bash completion suggestions to use them. So, I am trying to simulate two tabs and pipe the result to something else. I am looking for something like: $ getCompletions git ...
0
votes
0answers
11 views

Is there a way to obtain an official Git binary without using a package manager? [duplicate]

I'm a user on a shared Unix system. For one of my scripts, I need a particular version of Git, but the version installed on the system is too old. So I would like to install Git in one of my local ...
3
votes
3answers
209 views

write error: No space left on device. Removing 'extra' packages. Attempting recovery

The Issue: When I type: dpkg-query -Wf '${Package;-40}${Priority}\n' | sort -b -k2,2 -k1,1 I get a list of all installed packages on my machine, example: ... raspberrypi-artwork ...
1
vote
0answers
114 views

Build CentOS RPM for current git release, unsuccessful rebuild with alternate prefix

I am stuck in an effort to provide an maintain an up-to-date git release for a collection of CentOS Linux servers. I was hoping to be able to create binary RPMs that I could just have published to a ...
0
votes
1answer
36 views

git push via ssh to ubuntu VM not working but I am able to ssh to the same ubuntu

I have setup of ubuntu Guest VM on Virtualbox on MAC HOST. I have setup the ubuntu as server with the help Created ssh key and put the public key on the Ubuntu and I am able to ssh I have added ...
7
votes
3answers
6k views

Tar a folder without .git files?

If I tar a folder that is a git repository, can I do so without including the .git related files? If not, how would I go about doing that via a command?
3
votes
1answer
93 views

How to create an alias for two Git commands that use a parameter? [duplicate]

I regularly have to delete a local and remote Git branch. Therefore, I run the following commands: $ git branch -d feature-branch $ git push --delete origin feature-branch Since I mostly execute ...
1
vote
2answers
54 views

Forward ssh for git user to git server

It is surprisingly difficult to find information on this simple problem. Like many people we run a gitlabs/gogs server on a remote instance. Currently it listens on port 10022. We also run ssh on ...
1
vote
0answers
29 views

How to install the latest version of Git on Ubuntu? [duplicate]

I have version 2.5 of Git on Ubuntu: $ git --version git version 2.5.0 but Git is at version 2.7.1 now. The Git website says to do apt-get install git to install it. But I tried both sudo ...
0
votes
1answer
67 views

How do I get git to give me an acceptable pkgver for Atom which I can use to check it out?

I am working on the atom-editor-git PKGBUILD in the AUR, hoping to turn it into an Atom equivalent to the gvim-git PKGBUILD. See the gvim-git PKGBUILD updates its package version whenever it is run to ...
18
votes
5answers
14k views

Is there a usable gui front-end to git on Linux?

I'm a former windows user and just started using ubuntu. On windows, we had two great softwares: TortoiseSVN and TortoiseGit. Both are so good programs that they allow us to do everything like commit, ...
1
vote
1answer
22 views

Merging text file directories

I have two directories: Libc-825 and Libc-1044. Imagine that version 1044 is newer, but buggy. Is there a way to merge these file trees? I have there C sources with not so big differences. I have ...
0
votes
0answers
43 views

Git “unknown revision” error when within bash script

I'm writing a shell script that needs to perform certain operations based on the last commit's message of my local branches with a name starting with "task". Here's what my script looks like ...
0
votes
2answers
30 views

Patching diff-files

I've downloaded a tarballed version of 0.85 "MTR" -> http://www.bitwizard.nl/mtr/ and installed it. I later saw that a 0.86 diff file exists. I downloaded this in order to patch it, but am confused ...
12
votes
3answers
2k views

Can git configuration be set across multiple repositories?

Git seems to support configuration values at three levels: Per-system global settings (stored in /etc/git-core) Per-user global settings (stored in ~/.gitconfig) Per-repository local settings ...
0
votes
0answers
8 views

How do I clone the git repository of an individual Arch Linux package's source files? [duplicate]

I would like to clone this repo for VirtualBox, so that I can bump it to version 5.0.14 locally and update VirtualBox on my Arch machine using it. I know I can clone community.git from ...
0
votes
1answer
57 views

Can someone please explain this error I'm getting in my script

I'm trying to create a script which I can set as a cron job which adds all my dotfiles to a folder I've set up as a github repo then push them every evening. My script is the following. cp ...
8
votes
3answers
3k views

command line method or programmatically add ssh key to github.com user account

Is there a way to identify with a username and password to github.com servers for the purpose of adding an ssh key to the github user account? So far everything I've read suggests that a user's ssh ...
1
vote
1answer
41 views

Estimate time spent on Git project with grep

Consider a Git log: commit 4d6b30238fbfc972ea4505cadf43abd316506d9e Author: Dotan Cohen <dotancohen@foobar.com> Date: Mon Jan 11 22:41:21 2016 +0200 Final foobar version commit ...
1
vote
0answers
288 views

Run git pull from a shell start-up script

I have Raspberry Pi that loads a shell script on start up. This script runs a python script, boot_camera.py, which is found in a repository. I Have a server which sends the Raspberry Pi a command ...