Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
2
votes
0answers
23 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 seperate servers, 1 live and 1 dev.
on dev I created a group and added the ...
0
votes
1answer
12 views
Git Daemon not using specified base-path
I have the following configuration in /etc/xinetd.d/git
# description: The git server offers access to git repositories
service git
{
disable = no
type = UNLISTED
...
0
votes
1answer
22 views
Why does git wrap my log output in quotes?
If I used the following command:
git log --pretty=format:"%ad %s%d"
the output is:
Tue Apr 26 11:29:24 2016 +0000 Updated configuration
If I do the following:
SIMPLE='--pretty=format:"%ad ...
3
votes
3answers
44 views
Conditional PS1
I'm basically trying to make my PS1 look like this when in a git repo:
$ ~/Projects/Blah (master):
Or if I'm not in a Git repo, I want it to look like this:
$ ~/Projects/Blah:
This is my current ...
1
vote
1answer
35 views
How to backup files in multiple directories with git?
The example below is simplified to show the core of the problem, not the problem itself(my file tree is more complicated than that).
Let's say that I have two files I want to back up; one in ...
2
votes
1answer
12 views
How to replay Git repository history into subdirectory?
Let's say I've got two repositories aye and bee and I want to get rid of bee, in such a way that the linear history of bee/master is "replayed" in a new subdirectory (several levels deep) of aye. I ...
0
votes
1answer
47 views
Debian git error: undefined symbol: __gmpn_cnd_add_n
$ sudo apt-get install git
$ git clone sth
Cloning into 'a-folder'... git-remote-https: symbol lookup error:
/usr/lib/x86_64-linux-gnu/libhogweed.so.2: undefined symbol:
__gmpn_cnd_add_n
...
1
vote
2answers
41 views
Detect and remove empty directories from list
A common problem game developers have with the Unity3D engine and Git is that Unity and Git fight for whether an empty directory should exist or not - Git doesn't care, Unity3D will keep making git ...
4
votes
5answers
438 views
Can I display GIT in prompt when current directory has a .git folder?
Can I display GIT in prompt when current directory has/contains a .git folder? Is there a way to do this? My current prompt is defined like so:
export PS1="[\u@\h] \w $ "
So, my prompt looks ...
1
vote
3answers
68 views
Git Backup /home with other repos inside it
I'm trying to make an automated backup of my /home directory. In theory this is simple by running this in a cronjob:
cd /home
git add .
git commit -m "nightly backup"
git push
where push will push ...
1
vote
2answers
31 views
How to get first 5 chars of a git commit hash id and store it in a variable in bash?
${$(git rev-parse HEAD):0:5}
bash: ${$(git rev-parse HEAD):0:5}: bad substitution
git rev-parse HEAD returns the hash id, but how do I make a substring out of it?
if I divide it into two lines, it ...
2
votes
0answers
24 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 ...
1
vote
1answer
36 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 ...
11
votes
1answer
453 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
40 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
49 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
24 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
47 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
61 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
96 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
139 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
249 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
44 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
58 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
131 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
78 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
22 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
47 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
31 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
88 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
45 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
71 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
28 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
23 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
66 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
38 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
608 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
33 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
48 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
21 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
12 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
28 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
42 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
131 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
319 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
86 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 ...