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

0
votes
0answers
30 views

bash scripting read stdin issue [on hold]

In my bash script, I was reading sdtinput like below: clone_repo(){ //cloning a specifc branch on my_app dir export GIT_WORK_TREE="path/my_app" } cd_app(){ ...
2
votes
2answers
27 views

Git alias multi-commands with ; and &&

I want to have an alias that execute a command and then whether it fails or no it execute other commands that depends on the success of each other. So I have something like that in .gitconfig ...
1
vote
0answers
14 views

delete .gitignored files with rsync

I often need to use rsync to synchronize a local with a possible remote directory, while ignoring exactly all the files git would ignore because of its .gitignore configuration. To do so, I am ...
1
vote
1answer
20 views

Can't push git updates & run Unix commands when connecting via SSH

I have installed java 8 on my bluehost VPS. I have followed http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/ instructions . In order to add directories to PATH variable I have added ...
3
votes
1answer
14 views

Find repository names from gitolite info output

How do I extract the names from the gitolite info command output, for further piping into a script? I'm writing a migration script to migrate all my repositories from gitolite to a Gitlab server. ...
2
votes
2answers
30 views

Get last commit message, author and hash using git ls-remote like command

I'm looking for a way to get three informations using git ls-remote like command. I would like to use it in a bash script running in a cron. Currently, if I do git ls-remote ...
0
votes
1answer
7 views

Deleted gitweb folder, don't know how to reinstall it

Since two days I'm struggling with making Gitweb work on my home server machine. I've modified so many configuration files till now, that I've decided to completely remove the Gitweb package from my ...
0
votes
1answer
36 views

How to select the tag of the latest non-unstable/release candidate version?

I've downloaded the latest kernel sources: git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git cd linux-stable git tag -l | less and picked v3.9.1. git checkout -b ...
1
vote
0answers
40 views

Making zsh filename completion case-insensitive everywhere

I have the following line in my zshrc to make filename completions case-insensitive: zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' This works most of the time but I’ve noticed that if I ...
4
votes
1answer
23 views

Shell script: filter list of .pdf files, to exclude those with a .tex source file

I have a linebreak-separated list of file paths, all to pdf files. I would like to filter out all those which have a corresponding *.tex file in the same directory (and so can be presumed ...
4
votes
1answer
49 views

git: show which files have changed between kernel 3.18.6 and 3.18.7

I have checked out linux kernel git repository git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git I know how to use git log, git show and similar commands to see ...
0
votes
1answer
23 views

get the tag of a git branch

I'm currently trying, for fun, to build a package management system (similar to apt / yum / zypper, etc...) using the git revision system, and I' searching for a way to know what is the latest stable ...
1
vote
3answers
33 views

xargs git: skip user input

I have an xargs function that calls git commands recursively. When I now call gitr log I have to hit enter until the end or q to get the next xargs call to run. Can I tell xargs to skip user input ...
1
vote
0answers
25 views

Non-deterministic errors when using nested sshfs

The OSX implementation of sshfs doesn't like to connect to my Android phone running SSHDroid, so I'm attempting to gain access by mounting an ubuntu VM via sshfs which in turn has a mountpoint to the ...
0
votes
1answer
19 views

I'm trying to deploy with git to a semi-managed vps, need to write a script to change owners

I'm trying to deploy my sites on my company's semi-managed vps server using this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps It ...
0
votes
2answers
73 views

Running bash script with sudo, and git inside of it

I have such a bash script: #!/bin/bash cd /home/user/projekt git config core.sparseCheckout true git pull origin master wait rm -rf ...
0
votes
0answers
39 views

zsh git command auto-complete add extra origin to the git branch name

After I clone a git repository locally, I want to switch branch to, says, 'ABCD'. $ git branch -a * master remotes/origin/ABCD remotes/origin/HEAD -> origin/master remotes/origin/master $ ...
1
vote
1answer
22 views

Does git no longer support automatic rebasing?

Very recently git has started merging even though I have set it to always rebase: $ git config --list | grep -F branch.autosetup branch.autosetuprebase=always $ git pull [Removed everything in the ...
0
votes
1answer
156 views

ssh connection to gitlab.com fails behind home router, but is fine when at workplace. However, Github and Bitbucket over ssh are fine at home

I am trying to connect to my repository on gitlab.com. It used to work on my laptop both when I was at home and when I was at work. I was using ssh and had added the ssh keys to gitlab. Suddenly ...
1
vote
0answers
23 views

Dealing with git permission errors on root mounted partition

I am trying to clone a git repository from my home directory to a cifs partition, but I keep getting this file permission error. [cguest@devserver groupmount]$ pwd /mnt/groupmount [cguest@devserver ...
0
votes
1answer
52 views

virtualbox - existing folder in ubuntu as shared folder

I have some existing directory in virtualbox running ubuntu, and would like to make this folder a shared folder in virtualbox, so that the host OS, will see it. The end goal is to use git in the host ...
1
vote
0answers
44 views

Restrict SSH access to git usage only

Using: ssh-keygen -O force-command="/bin/restricted-command", or command="/bin/restricted-command" at the beginning of an authorized_keys line one can force a key-based SSH connection to execute ...
2
votes
0answers
20 views

Get git branch from several folders/repos

I have a folder with several repositories inside. Is there any way I can run git branch or whatever git command inside each folder? $ ls project1 project2 project3 ...
1
vote
1answer
232 views

Can't connect to a server via SSH (with my PC only)

For some days I'm experiencing issues with SSH on my machine (I guess after having installed some softs that I don't remember... (sic)) It's very problematic as I use Git to work on some code ...
2
votes
1answer
49 views

Strange characters in GIT completion

I'm running bash GNU bash, version 4.3.25(1)-release (x86_64-apple-darwin13.4.0) on OS X 10.10.1. A week or so ago I've noticed that autocompletion has stopped working, but only for git. I'm ...
1
vote
1answer
47 views

Broken git autocompletion after I have overridden the git command

Recently git branch <tab> started showing me the following error: $ git branch bash: -c: line 0: syntax error near unexpected token `(' bash: -c: line 0: `/usr/bin/git --git-dir=.git ...
1
vote
2answers
14 views

Providing access permissions to 2 git repositories inside single git instance

I have two git repositories in one single git instance and need one set of users to access one repository and another set of users to access second repository. How can I create a group, and add users ...
0
votes
1answer
44 views

Why is .gitattributes applied only to files added to repo after defining it?

In my repos I'm implementing a new interesting strategy to preserve some versioned files from merges, that makes use of custom merge drivers and .gitattributes. Please take a look: ...
0
votes
1answer
245 views

How to exit a git merge asking for commit message?

I'm new to git. I did a normal merge, but it keeps asking this: # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic ...
2
votes
1answer
44 views

how to change git path?

So I just installed the latest git, with the official mac installer. I'm on Mavericks. Sadly, git --version is still git version 1.9.3 (Apple Git-50) and which git gives me: /usr/bin/git ...
1
vote
1answer
63 views

Can ssh (agent) work with two separate identities? [duplicate]

I use an Ubuntu 14.10 distribution, and two private keys, one encrypted (~/.ssh/E.key), and one not encrypted (~/.ssh/NE.key), which I use for accessing two github repositories, respectively, repoE ...
2
votes
5answers
90 views

etckeeper with git, a way to deal with huge repo

I recently discovered that /etc/.git/ reached about 30G [sic!] of disk space. This repo is only for etckeeper. I have small experience with git. I came up with two solutions: Obvious one, delete ...
2
votes
2answers
76 views

Editing Remote Files in Git repo

I have a remote Linux machine which I use as a development server for a web application. I cannot reproduce the environment locally, the files must execute on the remote server, but I want to edit ...
0
votes
1answer
22 views

How to make Logwatch track git commits

I have a webserver with a git repo containing a website. I have made a CMS using PHP where PHP automatically commits to git when files are changed. I would like to track these commits (preferably in a ...
2
votes
1answer
161 views

What's the difference between `git reset file` and `git reset HEAD file`?

I find both of these can unstage a file. I used to use git reset file to unstage a file. But today when I read the http://git-scm.com/book. I find it taught me to use git reset HEAD file, what ...
1
vote
2answers
47 views

Safe way of letting users upload their public keys

I need to let untrusted users, strangers, upload their id_rsa.pub to my server and onto a given user's authorized_keys (user git in my case). What is the safest way of achieving that, without having ...
0
votes
0answers
37 views

Git, puppet `file` type and symlinks

I'm working on merging two puppetmasters into one. Configurations for each are kept in its own git repository. puppetmaster1 must go, and all the hosts must be handled by puppetmaster2. In ...
1
vote
1answer
42 views

Is there a way using a bash script to get the location of changes made in last git commit?

I need to check the location of the files, which were changed in the last commit. Because I will have to do this on Jenkins, this should be done using a bash script. This is the output of git ...
3
votes
1answer
307 views

Rsync folder while --exclude-from'ing .gitignore files at different depths

So I'm trying to work on a command to rsync a source folder with a structure like so: - app.js - .gitignore - src/ - src/logs/ - src/logs/.gitignore The first .gitignore would have a series of ...
1
vote
1answer
199 views

what does “ gbp:error: upstream/1.5.13 is not a valid treeish” mean?

I want to build a debian package with git build package.(gbp) I passed all steps, and at least, when I entered gbp buildpackage, This error appeared. what does it mean? and what should I do? ...
0
votes
0answers
225 views

Fedora 20: Can't install git

[root@8440p Downloads]# yum clean all Loaded plugins: langpacks Cleaning repos: rpmfusion-free rpmfusion-free-updates rpmfusion-nonfree : rpmfusion-nonfree-updates updates Cleaning up ...
1
vote
0answers
48 views

Problem with Bitnami Gitlab

I have installed Bitnami Gitlab on a centos 6.5, but I just see the error written below while trying to push to another project: ~/sample$ git push -u origin master git@-'s password: fatal: ...
1
vote
2answers
114 views

fatal: Reference has invalid format: 'refs/stash (1)'

I have recently upgraded from ubuntu 14.04 to 14.10 using apt-get dist-upgrade, which seems to have gone smoothly, except that I can no longer use one of my git repositories (on which I had local ...
0
votes
1answer
75 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
1answer
104 views

Does `git archive` use the wrong file timestamp?

It seems git archive creates a tarball with wrong file modification timestamps, resulting in tar complaining when unpacking: $ cd repository $ git archive -o repository.tar.gz master . $ find ...
2
votes
1answer
131 views

In a Virtualbox VM how do I set the filesystem permissions?

I have a virtualbox VM with arch Linux running on my windows PC (which I unfortunately have to use for work). I use this to work on my windows PC with a Linux environment as an alternative to Cygwin. ...
3
votes
1answer
176 views

How to create a deterministic tar.gz using git-archive?

Creating a git repository for testing. ~ $ mkdir somefolder ~ $ cd somefolder/ ~/somefolder $ git init Initialized empty Git repository in /home/user/somefolder/.git/ ~/somefolder $ echo test > ...
19
votes
3answers
296 views

How did the Linux Kernel project track bugs in the Early Days?

We all know that Linus Torvalds created Git because of issues with Bitkeeper. What is not known (at least to me) is, how were issues/tickets/bugs tracked up until then? I tried but didn't get anything ...
0
votes
1answer
28 views

Downloading code with git

I am new to git and want to download some code from GitHub, for which I have a URL: https://github.com/PointCloudLibrary/pcl/tree/master/doc/tutorials/content/sources/qt_visualizer I have installed ...
0
votes
1answer
157 views

Opensuse 11.1 package manager outdated

I'm trying to update GIT to the latest version. The package manager for opensuse 11.1 only has up to git 1.6.0.2. I'm updating using zypper: sudo zypper install git And I get the following ...