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
63 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
35 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 https://...
0
votes
1answer
211 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
50 views

Estimate time spent on Git project with grep

Consider a Git log: commit 4d6b30238fbfc972ea4505cadf43abd316506d9e Author: Dotan Cohen <dotancohen@foobar.com> Date: Mon Jan 11 22:41:21 2016 +0200 Final foobar version commit ...
1
vote
1answer
85 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
31 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
27 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
75 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
50 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
1k 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
60 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 ...
1
vote
0answers
29 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
14 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
35 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
76 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
199 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
549 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
106 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
72 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
138 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
22 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
9 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
122 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
460 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
303 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
122 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
107 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
126 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
18 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 ...
2
votes
1answer
367 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
139 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
30 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
82 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
119 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
49 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
149 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
3k 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
82 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
202 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
65 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
32 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
47 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
167 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 ...