Questions tagged [git]

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

157 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
26 views

git return filtered repo to original parent

I want to reverse a git filter-branch and want to know the best way to do this. Originally I had a repo like this : A p q r I then made q its own repo so that I had this: A p r Q Now,...
4
votes
0answers
113 views

Is there a standard text mode tool to render heatmaps for arbitrary numeric matrix data?

For the curiosity's sake I created a script to visualize Git history week/hour-of-day basis timestamps in order to collect some stats. The following script #!/bin/bash # Declare the global heatmap ...
4
votes
0answers
702 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 ...
4
votes
0answers
139 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 ...
4
votes
1answer
67 views

git report moved lines

I want to track the number of additions and deletions that exclude moved lines. So if a commit has 10 additions, 5 deletions, and 3 moved lines, then I have 7 additions, 2 deletions excluding moved ...
4
votes
0answers
300 views

Restricting access to just CVS and Git commands

At work we have a server which hosts our CVS repository and in order to restrict shell access to this system, I have deployed rssh which has worked well for a number of years. We are now converting ...
3
votes
1answer
158 views

How to generate (git) diffs with <n> characters of context?

The --unified=<n> option lets you set the number of lines; is there a way to do the same for characters? example limit the context around the changes to X character(s) when using git diff --...
3
votes
0answers
76 views

How do I upstream a patch into the Linux kernel developed by someone else?

I've recently been trying to upstream part of the Nintendo Switch-on-Linux patchset, but it appears that the original developer must sign off on each commit. Do I need to ask the original developers ...
3
votes
0answers
55 views

Git - prune every whitespace-separated word originally introduced by specific author in project's history

We have a project under git revision control with only a single branch. We need to remove every new whitespace-separated word that was introduced for the first ever time in a given file by a specific ...
3
votes
1answer
118 views

High memory usage from “git status -z -u”?

I am running Ubuntu 16.04. Recently I often find one or two "git status -z -u" process that each takes more than 5GB of memory. So I try to figure out what's going wrong. pstree gives me some output ...
3
votes
0answers
100 views

How to package README.md in a Debian git source repository?

I'm trying to create a brand new Debian-ish package (mostly for private use but I'm thinking about publishing it on GitHub) based on a third-party program that doesn't currently have a Debian package. ...
3
votes
2answers
248 views

Is there a a shell extension which is like scm_breeze where the output is numbered and you can alias to a file by its number

In scm_breeze, output is numbered and you can use the numbers in subsequent commands. For example here I am doing git status to see the changed files and then staging the first file for commit: ...
3
votes
0answers
150 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 ...
3
votes
0answers
185 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 separate servers, 1 live and 1 dev. On dev, I created a group and added the ...
3
votes
0answers
1k 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 ...
3
votes
0answers
955 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 ...
3
votes
0answers
1k 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 ...
3
votes
0answers
944 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
748 views

Fixing git object headers

I have a git repository that is not corrupt (all object files remains, i can commit to it and so on). Recently I noticed that some older commits are broken, "error in commit": git fsck --full ...
3
votes
0answers
30 views

Synchronize KDE4 Hotkeys

how can I synchronize my personally defined KDE4 Hotkeys between different computers? I would like to check in a file in git, as I do it with .bashrc and other configuration files. I found .kde/share/...
3
votes
1answer
427 views

How to disable anti-aliasing in git-gui and gitk

After an upgrade to Tcl/Tk 8.5, git-gui and gitk are using anti-aliased fonts which look ugly on my display. I can select different fonts in the preferences dialog, but the fonts I was using before (...
3
votes
0answers
666 views

SSH login from external authentication

Here is what I try to accomplish: I have a server with a git repository. I use ISPConfig as control panel for our websites and I want to integrate the ISPConfig API for email authentication as second ...
3
votes
0answers
333 views

Git completions for aliases only available after running `git reflog`

I have a few aliases that I want to autocomplete for git, e.g., the following alias gco="git checkout" When I was attempting to add completions for this alias, I looked around in my path and saw ...
2
votes
1answer
34 views

Export git repository as (editable) ascii

LibreOffice can save files in .fodt which is a nice text format that you can edit and then read back in LibreOffice. The .fodt format contains the same information as the binary version. Is there ...
2
votes
0answers
55 views

Why was every .git folder on my system modified?

I ran my semi-regular rsync backup on my personal laptop to an external drive today, and I noticed many .git/ folders had their backups updated, presumably because they were all modified. However, ...
2
votes
1answer
558 views

Display git branch in terminal

I am using fedora OS and I want to display git branch or tag in terminal when I go into the git folder project. I follow this tutorial. After I ran: source /usr/share/git-core/contrib/completion/git-...
2
votes
2answers
3k views

Git asks for password when using SSH URL, ssh does not

I have three servers (two ubuntu 16.04, one mac mini) and several macbooks. One server ubuntu is for gitlab and the other is an internal site server. The mac mini is running a CI. Recently the ...
2
votes
0answers
56 views

Git-Branch status

In my .bashrc file, I have those two blocks : 1- # get current branch in git repo function parse_git_branch() { BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` ...
2
votes
0answers
365 views

understanding this “git bare repo” approach to dotfiles

I found this neat way to migrate dotfiles between computers. It works, but I don't really understand how. I can do everything he mentions in the article, but what I can't figure out is how I fetch ...
2
votes
0answers
370 views

How to do `--index` with `git stash pop` by default?

git stash pop has an option --index which will try to restore the git index upon pop. How to use it by default? I want git stash pop to restore index by default.
2
votes
0answers
380 views

UTF-8 problems when sending 'git format-patch' files with mutt

Yesterday I created a commit in git, used git format-patch to create a patch and finally sent this patch as an email via mutt, using mutt -H <patch>. Somewhere along this chain my name, that ...
2
votes
2answers
445 views

How to use Git merge drivers with Jenkins

I recently searched for a way to merge pom.xml-s automatically with Git merge driver. Got it working locally, but now I'd like to add this solution to Jenkins -- no luck so far. What I did: 1) I ...
2
votes
0answers
1k views

What is return code 1 for git-rebase? What are other values it could return?

I've got a script that takes changes from master and applies them to all branches. The script works well for us because we tag our releases and use dev-branches. We don't maintain a separate branch ...
2
votes
0answers
139 views

Git Server with several repos

I'm setting up a Git server, and there will be three different groups working on different projects iOS, WebDevel, Android. I need to do it in a secure/safe way. Meanwhile, I don't want iOS ...
2
votes
0answers
101 views

How to handle multi-machine-dot-file-versioning

I'm thinking about versioning my dot-files via git on a public repository. I've moved all the interesting dot-files like .profiles or .vimrc to the repository and subsequently symlinked them to there ...
2
votes
0answers
41 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
0answers
91 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....
2
votes
0answers
51 views

Using gitk to view changesets in a linux server using etckeeper?

gitk is a pretty good tool for viewing changesets in a git repository. Is there any way to use it locally on my workstation to view/review an etckeeper git repository on a remote server? Also ...
2
votes
1answer
1k views

Customize Git Bash Color

I used to have a black / orange / green git bash color style. Now I needed to download it again and it's a mess (for me). All pink, lime green and yellow. It hurts my eyes. Is there a way to ...
2
votes
1answer
293 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 ...
2
votes
0answers
380 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 ...
2
votes
0answers
161 views

Git and Puppet Master Lifecycle

I'm looking to setup a Puppet Master which hosts its configuration in a Git repository. I assume that I'd host my Puppet Configuration in a Git repository centrally organized on a Git hosting ...
2
votes
1answer
903 views

allow user access via ssh to /var/www/

Context: I am creating a gitolite3 hook for a specific repo, which contains some logic and css foo of my website. so what essentailly happens is Content under /var/www/nginx/ looks like: drwxrwxr-...
2
votes
1answer
838 views

what starts runsv on a Debian system using init and how?

A bit of background: I installed git-daemon-run on a Debian system, and now git-daemon starts at boot automatically, even though there is no init script for it in /etc/init.d. I did some digging and ...
2
votes
0answers
7k views

'Git clone' times out with 443 error message

git clone -v https://github.com/me/myproj Cloning into 'myproj'... <minutes pass> error: Failed connect to github.com:443; Operation now in progress while accessing https://github.com/me/myproj....
1
vote
0answers
33 views

Git - extract subfolders of repository into new repositories

I have a folder structure like this, with all folders and files within one git repository: ├── folder-01 │   └── script.sh ├── folder-02 │   └── script.sh ├── folder-03 │   └── script.sh ├── folder-...
1
vote
0answers
39 views

Why is “git pull” trying to use CURL_OPENSSL_3 while libcurl4-openssl-dev is installed?

When I run git pull I get the following error: git-remote-https: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by git-remote-https) Why is git trying to use ...
1
vote
0answers
31 views

Distributing a Module.symvers

I'm creating a set of kernel modules. Each module is its own project. One of these modules provides an interface to many child modules. ie. One parent module has exports and the child modules import. ...
1
vote
0answers
268 views

Git add, commit, push from bash script

I'm trying to write a simple cron job that will keep my org-mode files in sync with a GitHub repo by committing every now and then. For some reason, it always manages to commit the files, but even ...
1
vote
0answers
84 views

Debian 9 - sign_and_send_pubkey

I decided to start switching my machines over from Ubuntu to pure Debian but I'm currently stuck at a hurdle with configuring my git repositories related to ssh. I created a new key and added it to ...