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
1answer
37 views

ssh asking for passphrase that doesn't have passphrase

I'm trying to build docker image with this docker file and I need to clone some private repositories from bitbucket. FROM ubuntu RUN chsh -s /bin/bash RUN apt-get update RUN apt-get install -y ...
1
vote
1answer
27 views

howto use ~/.ssh/config with Windows/PuTTY

howto use ~/.ssh/config with Windows/PuTTY? Are PuTTY settings stored in registry? I wish to have my PuTTY settings in git. So it needs to be a human readable text file.
0
votes
1answer
40 views

A bash script that can automate git commit message contents

Normally when I commit a change to a submodule in Git (and if that's the only change), I will provide the result of git diff <submodule-name> to the body of the commit message (with ...
0
votes
2answers
15 views

can I set up openssh-server on local machine without messing my git ssh access to git and gerrit server?

We have git/ gerrit ssh on local machine (~/.ssh/id_rsa id_rsa.pub known_hosts + ssh-agent ) Now we want to access local machine from multiple remote clients (4-5 users, 1 user at a time), to ...
0
votes
0answers
21 views

enforcing php version based on git branch

Is there a way similar to .rvmrc to automatically set the php version used while developing in a branch? I think phpbrew will do what we want, however we are uncertain how to enforce a specified ...
-1
votes
1answer
88 views

mv command does not work in shell script [closed]

I want to rename a folder with a bash-script. I don't know why this command is not working in a shell script, but directly in the terminal is working without problems. ...some code... ...
1
vote
1answer
24 views

ssh-agent and timeout

I am using a script to update my system: cd /opt/ chmod 600 /opt/updater/.ssh/.pk ssh-agent bash -c 'ssh-add /opt/updater/.ssh/.pk; git stash; git pull origin master' /opt/updater/bin/updater.sh My ...
1
vote
2answers
38 views

Show git branches that diverged from remote?

Which command lists all the local branches that diverged from the remote branches they follow (either because the local branch has new commits or the remote one)?
0
votes
0answers
16 views

git refuses to connect without proxy

I work on a Linux system in a Windows environment. To authenticate with a NT proxy server I had setup cntlm and configured system programs to use it via setting http_proxy environment variable in the ...
2
votes
2answers
39 views

What optimized tools are available for comparing directory contents?

I am mirroring a Subversion repository tag with svn2git and I want to be sure that when I checkout particular revisions, those I obtain from the git mirror match those from Subversion. My main problem ...
2
votes
1answer
46 views

Can you fetch git commit data using cURL?

I need to fetch the object of an annotated tag (i.e. the annotation message) from a remote repository and so far there doesn't seem to be a command for that (i.e. ls-remote provides only the refs but ...
0
votes
0answers
36 views

git add . error on dedicated server; fatal: Not a git repository

I was able to initialize a git repo on a directory containing one of our websites, but when I try to git add . I get this error: fatal: Not a git repository: ...
3
votes
1answer
30 views

How to view entire commit when log is filtered by file in tig

If tig is invoked with tig log some/file.txt the log will show all commits affecting that file. Pressing Enter on a line like commit d5dd1d658e5d79701fb9d028479a0fcb26a033fa will open the diff view ...
0
votes
0answers
54 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 ...
0
votes
0answers
10 views

Hacking caja on mint

I'm trying to add a couple of changes to caja on Mint (MATE edition) and I'm trying to test them out, manually. Doing autogen.sh && make && sudo make install on the upstream version ...
0
votes
2answers
29 views

Git clone from Bitbucket

I am trying to git clone a repo off of bitbucket. I use git clone {https} temp. This gives me an error of refs not found. The https address is the one I get off of bitbucket, but the one they provide ...
3
votes
1answer
40 views

What is git revert --quit for?

From the git-revert(1) manpage it is not clear to me what the exact differences between the quit and abort options of the revert command are. From my exercises with the revert command I made the ...
0
votes
1answer
78 views

git Fatal: Out of memory, malloc failed on branch push

I know this has been asked a lot but I did not manage to get any solution to solve my problem. My coworker assigned me on a new project. The application is hosted on test Debian server with git ...
5
votes
1answer
132 views

How do I store colored text in a variable and print it with color later?

If I do git status --short, git lists files that are not tracked with two red question marks in front: I'm trying to store this in a variable and print it with color later. Here's my bash script: ...
1
vote
0answers
27 views

Why does git store my SSH identity in gnome, but not KDE?

I'm used to git only prompting me for my SSH passphrase the first time I need to authenticate to a server. On the system I'm currently on, this only works in a Gnome session. If I start a KDE ...
2
votes
0answers
40 views

File permissions when removing user from git

I have a shared git repository set up, which users pull from with the ssh protocol. I would like to set up the permissions in a way that only users in a specific user group (e.g. git_group) may ...
0
votes
2answers
28 views

use git to update my local copy with latest btrfs-progs

This is hopefully a very simple git question but I haven't been able to find the answer, most info about git assumes you want to upload and merge changes and my situation is much simpler than this. I ...
1
vote
1answer
69 views

Using git over sshfs on OSX

Due to a new job, I'm switching from working on Ubuntu 14.04 to OSX Yosemite. I mainly work in R, and I was using RStudio and git to manage my code on a server (Debian). To this I mounted the server ...
1
vote
0answers
74 views

Fetch patches from mailing list with mutt and vim

How can I fetch patches from a subscribed development mailinglist with mutt and vim so that they can be applied with "git am" or "git apply" command easily? Is it either possible to save it ...
2
votes
2answers
58 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
24 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
72 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
31 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
207 views

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

I'm looking for a way to get three informations from a remote repository 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
18 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
63 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
102 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
29 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
88 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
34 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
37 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
1answer
43 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
21 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 ...
1
vote
2answers
115 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 ...
1
vote
1answer
74 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
36 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
211 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
36 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
81 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
62 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 ...
3
votes
1answer
49 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
635 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 ...
3
votes
1answer
67 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
58 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
20 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 ...