Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-2
votes
0answers
16 views

Installing packages in Git-Bash

In Git-Bash,I am trying to install urw-fonts. This can be done by yum install urw-fonts but I did this and I got bash: yum: command not found i tried apt-get install urw-fonts and i got ...
0
votes
2answers
43 views

Debian 8 - Can't install Git

I'm trying to install Git using the following commands: sudo apt-get install git-core and sudo apt-get install git Both don't seem to work. It seems that it can't find some packages. This is the ...
1
vote
0answers
19 views

Debian 9 - sign_and_send_pubkey

I recently 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 ...
1
vote
1answer
59 views

What to do when hard link is lost because of my text editor

So, I have a file, for this instance we shall call it $HOME/Documents/hello.txt. I will write some text inside it: Hello, welcome to my text file And I will hard-link this file here: $HOME/Documents/...
1
vote
1answer
35 views

How is the Linux git repo related to other distribution git repos (such as Ubuntu)?

I am trying to build a custom version of my Ubuntu kernel, and want to apply a patch that I see on the main Kernel tree. I know that Ubuntu development happens in these repos: git://git.launchpad....
-1
votes
1answer
35 views

Problems While Installing Git in RHEL 7.6

I am trying to install git and I get the following error though I have a valid subscription of the RHEL Client 7.6. No package git available. Error: Nothing to do I ran the following commands: [...
0
votes
0answers
25 views

when I do git diff filename, I get “g -csn: pg: command not found”

When I run : git diff filename That returns : pg -csn: pg: command not found Why am I getting this?
1
vote
1answer
34 views

Git init in wrong directory? How to recover? (theoretical situation)

This is completely theoretical, but I'm new to Git and Linux so I want to know. If I accidentally manage to do git init inside e.g Desktop or Home directory, how to prevent any possible disaster from ...
0
votes
1answer
18 views

Remove .gitignored folders and `node_modules` and `vendor` folders whilst I rsync them

On my GNU/Linux machine I want to backup a list of files specified in a text file names rsyncFolders.txt the idea is to keep the files I want and to exclude unwanted ones to backup. In these folders ...
0
votes
1answer
41 views

I deleted my files with git rm, but i also commited them, how to get them back?

I ran git rm on some files thinking that they will be removed from the bitbucket repository, and i also commited them, after that i checked that they disapeared from the bitbucket repo, but they were ...
1
vote
0answers
24 views

How can I use for example SourceTree with a remote repository?

I've a server with a folder. In this folder I've did a git init to create a git repository in this folder. When I open now a file in this folder and change something, the git notices this and mark it ...
0
votes
0answers
11 views

git hook for pre fetch

I have a notify watching a local git directory and I want to disable the notify before the fetch,merge,pull... With the notify running, the pull of files alters the directory and fires the notify. ...
-1
votes
1answer
30 views

Git fails when not run as root

I just upgraded to Git 2.18 via EPEL on CentOS 7 and now Git fails on any operations that involve communicating with a remote server with the message fatal: unable to access 'https://my.repo.git/': ...
1
vote
0answers
58 views

How do I maintain a patched version of a package for unprivileged installation?

I use some common software packages frequently enough that I found it worthwhile to modify their code a bit to work more smoothly for my peculiar needs. However, I was not able to get my changes ...
1
vote
0answers
13 views

Cannot create Git remote on FreeBsd version 6.0 using git version 1.4

I'm trying to get some code in an old server running freebsd version 6 with git version 1.4.1 on to github. I'm trying to add a remote to the repo referencing GitHub.com repo. Does anyone have or ...
2
votes
1answer
35 views

How to create upstream tarball from Git repository of Debian package

I have a Git repository with these branches: debian master pristine-tar upstream I do not have an upstream tar ball. Can I create an upstream tarball from the Git repository I have? If so, how?
-1
votes
1answer
64 views

cannot create regular file '/usr/Desktop': Permission denied

Im trying to git clone git clone cp /usr/Desktop But it comes up with cannot create regular file '/usr/Desktop': Permission denied every time
0
votes
1answer
11 views

How to build Postfix from Debian Salsa Git? (gbp:error: upstream/3.3.2 is not a valid treeish)

I would like to rebuild the Debian package 'postfix'. Without anything fancy, so no local patches and unsigned packages are fine. Here's what I tried: Install some dependencies: $ apt install ...
-1
votes
1answer
48 views

How to clone multiple repositories from different project using shell script?

I had an url for multiple projects inside i have multiple repos for each project I need to clone all the repos in a directory and find git branches. i tried this #!/bin/bash project=(aa bb cc) aa=(...
0
votes
0answers
17 views

Error in git install from source on Ubuntu

I get the error message install: missing destination file operand after 'git' I tried to install git but whenever I tried I get git clone https://github.com/lwfinger/rtlwifi_new.git Command 'git' ...
0
votes
1answer
34 views

git pre-commit script

The goal is to exit from the script with a non-zero exit code when committing package-lock.json with no associated changes to package.json being committed. #!/bin/bash # exits with 1 if there were ...
0
votes
1answer
26 views

unable to execute git pull if the script is executed on reboot

I have created the following script: #!/bin/bash cd /home/pi/workspace/my-app /usr/bin/git pull python3 main.py & If I run the script from the console, git pull is executed as expected and then ...
0
votes
2answers
93 views

Check via shell-script if git repository's master branch is behind origin

I'm currently writing a bash script to remind me to rebase git repos when the local master branch is found to be behind origin/master. So far I have come up with the following, but $? always returns ...
0
votes
2answers
70 views

Cannot compile git on OpenBSD

I'm trying to install git on a college server, just for my user, but for some reason I can't compile it. I tried the latest version on github, as well as a couple random older versions from both ...
1
vote
2answers
23 views

How to show latest release's Git tag with message

Was creating a script to update a Github application in-place and needed to print changes made in the latest Git tagged release so users could make an informed decision about pulling the trigger on ...
4
votes
2answers
110 views

secure read-only self hosted git repository for scripts

I need to build a git server where certain users have a read-write access to the repository and management server running certain scripts using this repository has the read only access to the same ...
-1
votes
1answer
50 views

Creating a Shell Script that deletes specified files in git repo

How would I create a script that would take a list of file names in a git repository (I was planning on using a .txt file with one file name on each line, but I am open to other suggestions) as an ...
0
votes
3answers
59 views

Alias for git command

is there a way to make an alias for creating, a new branch? For example, I want to type "feat" and get something like "feature/blabla-" so I will need to add just a number. i want to type git ...
0
votes
1answer
77 views

use 'diff-highlight' for diff

I have set up diff-highlight as pager / highlighter for git. [pager] log = diff-highlight | less show = diff-highlight | less diff = diff-highlight | less That works perfectly. But how ...
-1
votes
1answer
33 views

Git Server Binding Directory To Port

I have a git server i have stood up. It is a basic one with all the remote repositories stored under /mygit/repo/ I can push and pull and all the other git stuff using this ssh syntax ssh:/...
1
vote
3answers
61 views

How to add ~/.zshrc file into git?

I would like to create a backup of the .zshrc file in my ~/ directory and avoid versioning all other items. How to exclude all subdirectories and their content? For example: cd ~/subdirectory/ &&...
1
vote
1answer
84 views

Protocol SSL is not working with Curl

I am trying to clone Wayland repository from git (for a project) but git clone command is throwing me an error. I installed curl (from here). After cloning make && make install. Earlier I had ...
0
votes
1answer
264 views

Yet another `sign_and_send_pubkey: signing failed: agent refused operation`

Here’s a Yet Another Question about the clash between ssh and gnome-keyring-daemon, since after spending hours and hours on the Internet I finally gave up. Environment OS: openSUSE 15.0 DE: XFCE ...
1
vote
1answer
21 views

Understanding environment variable / shell syntax

I was just following the install instructions for zsh-autosuggestions and I don't understand what part of the following command is doing: git clone https://github.com/zsh-users/zsh-autosuggestions ${...
2
votes
1answer
140 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 --...
0
votes
3answers
292 views

What is the difference between apt, apt-get and git?

I use Xubuntu and found that I can update packages by using apt and apt-get. But I have heard that programmers use usually git in their project to manage different version. So why Xubuntu do not use ...
0
votes
0answers
31 views

google-cloud-print-connector - SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

I have an ancient CentOS 5.11 installation on an inhouse server. The server is due for upgrade in a few months but till then, I'm stuck with 5.11. I intend to install google-cloud-print-connector but ...
2
votes
1answer
50 views

Tool for searching across branches and through history in a Git repository

I'm looking for a tool, or for suggestions towards a script, that would be able to search a Git repository for files based on both filenames and file contents (find/grep-like). It would need to be ...
0
votes
1answer
145 views

gpg: signing failed: Operation cancelled under tmux?

I have found a strange error. It is OK when I commit using gpg with git under bash or zsh. git commit -S -m "xxx" However when I commit it under tmux, I got: gpg: signing failed: Operation ...
0
votes
1answer
36 views

Does the devtools package include git?

In the Arch Linux standard packages, does devtools include git or do I need to install git separately? How can I figure out the answer to similar questions on my own?
0
votes
0answers
52 views

How to trace a specific historic file in the Linux kernel tree: Git question

I'm currently manually building a Linux image with some specific drivers for a Xilinx Zynqmp device. Aside from the main Linux tree, there are 2 other mirrored Linux repositories, one from Xilinx and ...
1
vote
2answers
62 views

How can I get the Linux terminal to look like Windows Git Bash?

Before anyone says it, yes, I know this is a duplicate, except when I copy/paste that code into tilde slash period bash(no period)rc, the terminal hasn't changed at all. I'm running Debian on Virtual ...
3
votes
3answers
119 views

Block git user from login, but allow the user to still function as a git repo?

I have setup a git server, by creating a user "git" and then creating a local repository in the git user's directory. The git server works great, I can pull, push, etc. I allowed users to interact ...
1
vote
1answer
34 views

Outputting if the last command was a successful git checkout

I am trying to echo to the console in the event that a successful git checkout happened, but cannot get it to work. function prompt_command { prev=`fc -ln -1` ecode=$? if [ ecode = 0 ] ...
0
votes
2answers
35 views

Git: autocomplete my prompt after failed push because missing -u flag

Using git, I often create local branches and then want to push them to the remote (e.g. Github). This requires the -u or --set-upstream flag. Here is what git outputs without this flag: $ git ...
0
votes
1answer
52 views

Git: change content of previous commit and push [closed]

I'm reviewing a repo and I'd like to make some comments, it would add more content like adding comments, make some changes ..etc. How to change content of files of previous commit and do push, I'm ...
3
votes
0answers
19 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,...
11
votes
2answers
1k views

Git: edit previous commits' messages only

For lazy reasons I pushed a bunch of commits with default messages and now it has become cumbersome, as I don't really know what I've changed in each commit. How do I edit just the messages of ...
0
votes
0answers
107 views

Git: exclude folder but include subfolder

I read this link: https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder/5534865#5534865 But this is use-case when git fails without any clue: * !abc abc/...
0
votes
0answers
74 views

Git: doesn't add filename with dash

lastest git versin on archlinux that doesn't add filename that contain dash, e.g: test-abc (git version 2.19.2) How to automatically add filename with dash (or folder) with git?