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

3
votes
1answer
26 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
69 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
40 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
4answers
922 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
35 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
55 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
27 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
13 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
29 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
54 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
166 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
518 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
99 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
68 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
116 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
21 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
94 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: /...
4
votes
2answers
350 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
3answers
250 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 Readme....
1
vote
3answers
111 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
92 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
120 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
15 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
291 views

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

I'm getting a bizarre error message while using git: $ git clone git@github.com:Itseez/opencv.git Cloning into 'opencv' Warning: Permanently added the RSA host key for IP address '192.30.252.128' to ...
2
votes
2answers
52 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 ...
2
votes
1answer
125 views

Errors with git alias shell command

I'm using bash version 4.1.2(1)-release (x86_64-redhat-linux-gnu) on cygwin with git 1.7.1. I wanted to make an alias for a command that needed to use the input argument twice. Following these ...
0
votes
1answer
29 views

How to have a global .gitconfig for 2 or more git repos?

This is my .gitconfig as it stands now :- $ cat .gitconfig [user] name = Shirish Agarwal email = shirishagxyz@gmail.com [credential] helper = cache --timeout=3600 This is in - $ pwd /...
3
votes
1answer
3k 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 ...
2
votes
2answers
38 views

git --diff like command for Linux local dirs

dir1 has 1 file and dir2 has 2 files as below: /tmp$ ls dir1 file1 /tmp$ cat dir1/file1 line1 line2 line3 /tmp$ ls dir2 file1 file2 /tmp$ cat dir2/file1 line1 /tmp$ cat dir2/file2 line1 /tmp$ diff ...
1
vote
0answers
78 views

No permission to git clone?

What is possible problem, if I have SSH key, and trying to git clone one folder from git lab, but I still dont have permission for it ?
2
votes
1answer
103 views

Is there a way to throttle git while it's cloning a repo.?

Is there a way to tell git that only use so much bandwidth while cloning a repo. ? I may have multiple applications each of which demands network speeds, is there a way to tell git to do this ? I ...
1
vote
1answer
48 views

Terminating Git

I accidentally typed git init in my home directory which caused git to start tracking everything in my home directory and I need to remove it. Is there a git command or a way to terminate git ...
2
votes
1answer
122 views

Git “write failed, file system is full fatal: unable to write new_index file”

I am running OpenBSD 5.7 and am modifying the kernel for a university assignment. It's running in a virtual machine. I cloned the repository into '/usr/src' and started to modify 1 file. I went $ ...
4
votes
2answers
2k views

Is it possible to clone only part of a git project?

I found a collection of slackbuilds, some i need there are on GitHub. https://github.com/PhantomX/slackbuilds/ I don't want to get all git. git clone https://github.com/PhantomX/slackbuilds.git But ...
5
votes
2answers
81 views

how do I call git commands without 'git ' in front?

How do I tell my zsh to automatically try a command with git in front, if the command is not found? E.g. I want to run $ status and if there is no status in $PATH, my zsh should try git status.
0
votes
1answer
32 views

Using Git on System Files [closed]

As the title suggests, I'm trying to have version control (using Git) on a particular subdirectory of /usr/. Namely /usr/share/texmf/tex/latex/. It is very annoying to constantly have to manually ...
3
votes
2answers
177 views

Is it possible to store user's crontab in user's git repository on OpenBSD?

On OpenBSD and with OpenBSD's cron and crontab, is it possible to store the crontab(5) of a user in a git repository of the same user? What would be the proper way to accomplish something like this? ...
1
vote
0answers
64 views

mount a NAS network share, but let the NAS sleep

I have a NAS (WD MyCloud) which has by default NFS/SMB access enabled. I also have a raspberry pi, that I would like to use as a git server that is addressable over internet using a SSH connection. ...
1
vote
1answer
31 views

Use suggested correction on typo

I had this idea: When you type git glone https://repo.git you get git: 'glone' is not a git command. See 'git --help'. Did you mean this? clone How can you automatically accept ...
1
vote
1answer
44 views

Backup workspace without local copies of remote git repositories

I would like to backup my workspace without backing up all the content of git repositories that are online available anyway. So I think of something like, that I could backup only the file .git/...
1
vote
3answers
1k views

Install Git offline without sudo

I have a corporate Linux server which does not have internet connection, and sudo access needs to be approved through many levels of hierachy. I've tried install git but I soon realized this needs a ...
1
vote
1answer
159 views

How download complete patch series from patchwork?

I want to download the patch series RFC PATCH 00/26 i.MX5/6 IPUv3 CSI/IC In patchwork I can get access to individual patches https://patchwork.linuxtv.org/patch/24331/. But downloading 26 patches and ...
0
votes
1answer
88 views

Need Info on linux command ssh-keygen -t rsa -b 4096 -C “your_email@example.com”

I have to access personal git repository at the university . I have been asked to Generate SSH key. I am using this command to generate an SSH key: ssh-keygen -t rsa -b 4096 -C "your_email@example....
1
vote
1answer
46 views

How to push a new branch to remote git with commit message

I am new to git. my remote git server does not allow me to push anything without having a commit message. Now i want to convert my perforce code to git using git p4 and push the converted code as a ...
1
vote
1answer
92 views

How to un-commit a file in git?

I have did git commit <file> for a file and also submitted that file with git submit <file>. but now i want to un-commit the changes. i have also tried git reset HEAD~1 <file> ...
0
votes
1answer
249 views

Elegant Way To Store Dotfiles on GitHub

I need an elegant solution to store my dotfiles on GitHub for easy access. I tried to create a dotfiles directory and symlink all the dotfiles into there. Then I tried adding the symlinks to git and ...
2
votes
2answers
108 views

Git config forwarding

I don't know if this even possible or not. I was wondering if there is any way like SSH Agent forwarding by which we can forward our .gitconfig on the remote server, and git automatically picks the ...
0
votes
1answer
2k views

Why can't I use ssh?

The problem seems to occur straight from the time I have installed Ubuntu 14.04 LTS. I first realized this problem when I was trying to connect with my hosting at HostGator. I neglected and thought ...
0
votes
1answer
156 views

how to pipe output from git commands into unix diff utility?

I am trying to achieve something along the lines of diff -ywB --suppress-common-lines `git branch --merged prod-server` `git branch --merged test-server` so that I can know the difference of what ...