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
1answer
25 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 ...
8
votes
1answer
354 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 ...
3
votes
1answer
23 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
0answers
41 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
18 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
35 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
49 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
41 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 ...
0
votes
0answers
54 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 ...
3
votes
3answers
145 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 ...
0
votes
1answer
17 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 ...
1
vote
2answers
36 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 ...
1
vote
0answers
87 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
45 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 ...
1
vote
1answer
21 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
38 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 ...
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
36 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 ...
1
vote
1answer
41 views

Estimate time spent on Git project with grep

Consider a Git log: commit 4d6b30238fbfc972ea4505cadf43abd316506d9e Author: Dotan Cohen <[email protected]> Date: Mon Jan 11 22:41:21 2016 +0200 Final foobar version commit ...
1
vote
1answer
58 views

Updating a git variable in the Shell prompt on every command

I am running TCSH and I would like to update my prompt every time I run a command. I think can currently do that via backticks. set tmpstr = `git status --untracked-files=no --porcelain` set ...
2
votes
1answer
23 views

Find all git repos that do not contain any one of .gitignore and .gitattributes

I basically want to find all git repos that have neither a .gitattributes nor a .gitignore file at the root. I used find . -type d '!' -exec test -e "{}/.gitignore" ';' -print to find it but it lists ...
3
votes
1answer
22 views

command-click git commit ID in Terminal, and be taken to that commit in github?

I'm running a Mac and use iTerm with ZSH as my shell. Currently I can command-click (⌘+click) on links or directories in my iTerm window, and that directory or web link will open. Is there a way ...
1
vote
0answers
59 views

customized pager for Git

I wrote a script to display git diff. It will display the difference in stdout if the output fits in the terminal screen, or display the difference in pager otherwise. My script: #!/bin/sh if ! ...
1
vote
2answers
35 views

how to edit author details for gitg?

I just recently installed gitg and whenever I tried to make a commit, I encountered an error of missing author details. However, I am unable to change author details as no editing window pops up after ...
2
votes
3answers
225 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 ...
0
votes
1answer
27 views

Should file expansion happen before a command sees its argument?

In Bash, given a command which takes a pathname as an argument, does file expansion happen to the pathname argument before the command can see the value of this argument? My question comes from my ...
0
votes
0answers
30 views

DNS problem with ipv6 on centos6

I have a couple of open-stack instances that communicates with github.com. When any of these machines reboots , the file /etc/resolv.conf gets the ipv6 addresses of my DNS servers. Everything still ...
0
votes
0answers
19 views

Git-cherry not ignoring whitespace as advertised

Given the following two versions of the foobar.txt file (excluding comments) ... ... on the upstream branch (version 1, commit 1): foo bar ... on the downstream branch (version 2, commit 2): # ...
1
vote
0answers
10 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 ...
1
vote
1answer
18 views

Is it always necessary to run etckeeper git commands using the vcs command?

I've seen some tutorials on the internet in which people are using etckeeper to keep a log of their server configuration, and yet they use the git command directly instead of running it through the ...
2
votes
2answers
26 views

How do I filter a list of files for text only files?

I wanted to have a git openlast command which would look at the last commit, get a list of added or changed files, filter them to only the text files, and finally open them in an editor. So far I've ...
3
votes
3answers
82 views

Git Bash - ls show repo folders

If i have a folder, Tools, so I pwd > /c/Tools in tools I have three folders (solution folders for Visual Studio but not important). I want a command like below 1234@Computer mINGW64 ~/Tools $ ...
1
vote
2answers
82 views

How do I reset a git branch to a given previous commit and fix the detached HEAD?

I needed to reset my branch to an earlier working state (commit) so I did: git reset --hard c70e611 Now I see HEAD detached at c70e611 nothing to commit, working directory clean How to fix / ...
1
vote
0answers
72 views

Bash - Parameters Reference passing (sort of)

So, I've figured out thus far how to utilize the "local -n " command, which effectively allows me to "reference pass" a variable from one function to another. this is rather helpful when parsing out ...
1
vote
1answer
46 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 ...
3
votes
1answer
68 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
0answers
19 views

How to make patch not so strict?

To give you the background, I'm trying to "port" "commit only parts of hunks" workflow from git to svn. In git there is interactive staging, and you can even edit hunks to be committed (chose which ...
1
vote
1answer
8 views

List files added and removed between tagged releases

Given two tagged releases in a Git repo, is it possible to list the files that were either added or removed? For example, suppose tagged release 1.0 has a number of header and implementation files. ...
0
votes
1answer
40 views

Error setting certificate while doing 'git clone' in redhat

Error: % git clone --depth 1 http://github.com/junegunn/fzf.git ~/Downloads/fzf Initialized empty Git repository in ~/Downloads/fzf/.git/ error: error setting certificate verify locations: CAfile: ...
3
votes
2answers
111 views

Can users in a group access a file that is in another user's home directory?

I have 3 users A,B and C inside a group 'admin'. I have another user 'D' in whose home directory, there is a project folder. I have made D as the owner of that folder and assigned 'admin' as the group ...
1
vote
2answers
111 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 ...
1
vote
3answers
77 views

Debian - Disable console access for specific user

I have a server with a git server running on it. I would like git users to be able to clone, push and pull using their linux username and password, but not to be able to login to linux console. If I ...
0
votes
1answer
56 views

Busybox pager with color capability?

I asked on Superuser about colors for git log in MobaXterm (on Windows), but it turned out that the problem wasn't MobaXterm—it's the lack of a -R flag in busybox's less. It would help my workflow ...
0
votes
4answers
95 views

Colorize filenames based on status for git diff --name-status

I often use git diff --name-status BRANCH_NAME to get the list of modified files. Is it possible to colorize the output of that command similar to the output of git status - green for added files, ...
1
vote
1answer
14 views

How to check-in annotated tags?

Our project recently moved from Sourceforge to GitHub. The migration did not include the subversion tags. I have very little Git skill, so I used 2.6 Git Basics - Tagging as a guide. I performed a ...
1
vote
1answer
127 views

“X11 forwarding request failed” when connecting to github.com

I'm getting a bizarre error message while using git: $ git clone [email protected]:Itseez/opencv.git Cloning into 'opencv' Warning: Permanently added the RSA host key for IP address '192.30.252.128' to ...