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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

How to deploy an automated version control system with git?

I'm planning to use git for version control with plaintext files (notes and configuration files) — this was the most popular solution on writing.stackexchange.com and personally I don't want a ...
user598527's user avatar
0 votes
0 answers
15 views

Tmux: Scroll buffer not working on MSYS2/MINGW64 (Git for Windows SDK)

I installed the Git for Windows SDK on Windows 11 to have the pacman package installer available to install tmux. A lot of stuff works like it used to be on other platforms, but scrolling back using ...
Martin Braun's user avatar
0 votes
2 answers
34 views

Copy gitignored files from host A to host B (rsync?)

I have a git repo where several files containing sensitive info are gitignored. These files are located in various subdirectories at various depths. Host A has all these files in place. I've cloned ...
ivan's user avatar
  • 1,838
0 votes
1 answer
41 views

Return list using git diff and grep

I'm using git diff to return the file names of files recently changed and i'm trying to pipe the returned file names into a grep expression that searches each file and returns the files that have &...
X13Theo's user avatar
0 votes
0 answers
35 views

What should the permission for .git folder look like? error: cannot open .git/FETCH_HEAD: Permission denied

I cloned repo to reproduce some examples with Ansible when I go for ansible-playbook install_dependencies.yml I am having error TASK [fetch k3s ansible role from github] ******************************...
Richard Rublev's user avatar
2 votes
1 answer
73 views

Oh-my-zsh deletes output of successful command with "FAIL: 141"

My Oh-my-zsh does the following: When I run the git log --pretty --oneline command, it shows me a long list of commits, as expected. As soon as I hit q, it suddenly disappears with the below output: ...
ritratt's user avatar
  • 131
0 votes
0 answers
40 views

fatal: unable to auto-detect email address (got 'root@pegasusv.(none)')?

pegasus@pegasusv:/linux_work/linux_stable$ sudo git commit -a [sudo] password for pegasus: Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@...
Zeshan Ahmed Nobin's user avatar
0 votes
0 answers
8 views

I ran npm install directly on my ssh and now git ci/cd is not updating anymore

Last night I merged a pull request in Git, on a repo that has script to continually deploy to a machine, and then ran npm i react lottie -force directly on the machine. After checking the website, ...
Skippy's user avatar
  • 1
0 votes
1 answer
88 views

How can I make git treat symlinks as a file?

I have a very specific use case. The DesignSync versioning system we use replaces files with their symlink to the remote repository when we check-in a file. Since I use git locally to version my ...
user568639's user avatar
1 vote
0 answers
57 views

My .bash_profile that displays the git branch of the repository doesn't work anymore [closed]

Last time I used this was in 2016 with an old version of Mac OS. I'm now using 10.3.1. # This file is sourced by bash for login shells. The following line # runs your .bashrc and is recommended by the ...
Samuel Bacay's user avatar
1 vote
2 answers
66 views

In bash, how do I create an array of committed files that still exist on my file system?

I'm using a bash script to create a Git hook. I want to run a process (linting) against files I'm committing. I only want to run the process if the files actually exist (in other words, not consider ...
Dave's user avatar
  • 2,226
1 vote
0 answers
46 views

Older version of git sporadically finds bad RSA host keys in known_hosts

I'm using an older version of git (2.8) on an older box (RHEL6), and I’m noticing some odd behavior. When the recent github RSA key exposure incident first happened and I did a git pull, I saw error ...
John Gordon's user avatar
1 vote
1 answer
36 views

git cat-file: when was introduced the "--" escape parameter?

I noticed that in git version 1.8.3.1 (provided by CentOS 7) it seems this command is not working: git cat-file -t -- "5378198ea7a83f5fa9bb3ba17f51be3a6ffbecc1:README.md" (Obviously specify ...
Valerio Bozz's user avatar
0 votes
1 answer
45 views

gvsf (GNOME virtual file system) on usb-ios, when I git clone, I get: fatal: could not set 'core.filemode' to 'false' , due to OS service to rename

I usb-connect my ios device on my linux laptop. The linux system mounts a gvfs point to it (/run/user/1000/gvfs/afc:host=xxxxxxxxxx,port=3), I change directory there, I can rsync back and forth, but I ...
Bruno Schroeder's user avatar
4 votes
1 answer
137 views

git: inconsistent behavior when using filter to strip comments

I am using filter to remove comments before committing config files in git: $ cat .git/config [filter "stripcomments"] clean = "stripcomments" $ cat .git/info/attributes /etc/* ...
400 the Cat's user avatar
0 votes
0 answers
29 views

getting proper key setup for both version control and deployment

Struggling with OpenSSL 3 and deployment from M1 with 12.3 to Ubuntu 22.04 The application was not deploying because of Net::SSH::Authentication::KeyManagerError: the given identity is known, but the ...
Jerome's user avatar
  • 137
1 vote
1 answer
244 views

Can't install git on Ubuntu 22.04 - unmet dependencies

I had git installed on my Ubuntu 22.04 LTS, but recently it became uninstalled somehow. git --version displays Command 'git' not found, but can be installed with: sudo apt install git. Trying to ...
Lizzy Thomas's user avatar
1 vote
0 answers
24 views

How to expand partial paths in Zsh when using git commands?

I use Zsh as my shell, OMZ as my package manager, and have the git plugin in my plugins list. Whenever I type a command like cd or vim followed by a partial path, the shell expands the partial path on ...
Matt's user avatar
  • 161
0 votes
1 answer
53 views

Zsh autocompletion for git bare repos

This is the completion code in my .zshrc: autoload -U compinit zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*' menu select zmodload zsh/complist compinit _comp_options+...
Stagnant's user avatar
0 votes
1 answer
33 views

Track archives with git

I have an archive (*.xpi) file in a git repository. How can I track the archive to get a more meaningful git diff then simply Binary files ... differ?
GooseDeveloper's user avatar
-2 votes
1 answer
86 views

Is Git hiding files on my computer?

I've accidentally created two branches for my Git repository: main and master, which I now need to merge. However, when using ls on the command line while checked into main branch, some files on my ...
pilks7's user avatar
  • 9
1 vote
1 answer
58 views

ssh and git setup

I am attempting to setup a private git server on my local network and I cannot for the life of me figure out what I am doing wrong. I can't seem to get ssh authentication via private key working for ...
ExecutionByFork's user avatar
0 votes
0 answers
22 views

Bash script with create-file-user command in InteliJ

Im trying to create a bash script which creates user by command create-file-user. But this command can only be entered in asadmin console, not in Git-Bash, so here is my question: How can I create a ...
Albert Albatros's user avatar
4 votes
1 answer
98 views

Inside less, is there an equivalent of ctrl-Z to recover the pager prompt?

I will occasionally use the pickaxe functionality of git to locate changes of interest. This can be quite slow, obviously (the same would apply to, say, hg grep), but more significantly it is bursty: ...
Pierre Lebeaupin's user avatar
0 votes
2 answers
41 views

Settings up git and managing file ownership on platform with several users

We have a platform on which multiple people can be working on the same packages. As such we would like to maintain each persons individual git credentials so it's not just one person's sshkey and one ...
Morten Nissov's user avatar
0 votes
1 answer
43 views

update during execution

I have a bash script in a git repo. I used git pull inside the script to update. But sometimes, when I do changes to the script itself, the whole script crashes because it is changed during execution. ...
decipher's user avatar
  • 152
0 votes
0 answers
52 views

How do I fix "\!" output ("-bash: !: command not found" error) from __git_ps1 in prompt?

I've noticed that I sometimes get spurious \! output in my bash prompt. (In iTerm on macOS Ventura. I can also reproduce in Terminal.app.) I can reproduce it by holding down or repeatedly pressing the ...
Henrik N's user avatar
  • 391
0 votes
1 answer
64 views

How to edit my git command to output requested data using a comma as a separator

I'm running this code below: git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' %(id)' | sed -n 's/^blob //p' | sort --numeric-sort --...
peso's user avatar
  • 147
0 votes
0 answers
19 views

Can I specify files from other directories to be added in a git repository?

I have a git repository called "workspace" which I add my code so I can access it from different machines. I wanted to add my code editor config files without copy pasting them every time or ...
denis-the-menace's user avatar
1 vote
0 answers
31 views

How to remove authentication with gpg-agent/git-credentialmanager to pus to a public repo?

I have a azure devops repository which I have made public recently. Before it was private and I used the git credential manager and gpg-agent. If I want to push my changes I will get the error: $ git ...
chko's user avatar
  • 11
2 votes
1 answer
111 views

Why git asks for username when ran inside a script?

I have a Push command, that runs this script: FindGits | { while read gitFolder; do parent=$(dirname $gitFolder); if [[ `git -C $parent status --porcelain` ]]; then ...
Ali Radan's user avatar
0 votes
0 answers
15 views

Can I recover my DWM config from git?

I accidently deleted a portion of my home directory. I did not back it up. I did follow this tutorial to set up and patch my dwm and dwmblocks configs. I did not initialize the repository on my local ...
user432111's user avatar
0 votes
0 answers
32 views

Which SSH setting takes precedence with Git?

Since I am sharing a login on a Alma Linux server with some colleagues, I was trying to better understand the precedence different settings take. We mainly use the server to run time-consuming Python ...
winkmal's user avatar
  • 101
-1 votes
1 answer
81 views

How to make git traverse soft symlinks?

Is there any way at all to make Git traverse a symlink and treat it as the destination file? I don't want to use hardlinks, they don't work across filesystems and can't be used for directories. I don'...
Jessica's user avatar
  • 321
1 vote
1 answer
233 views

fatal: unknown index entry format after search and replace

How can I execute this search and replace on Linux without getting an error? $ git status On branch main Your branch is up to date with 'origin/main'. nothing to commit, working tree clean $ find . -...
DevLloyd's user avatar
0 votes
1 answer
101 views

git: merge of csv files

I have a CSV file :> file save.dat save.dat: CSV text This is made of lines like this: 2022-12-31,08:36,meer,CLOSE_WRITE|CLOSE,/hd2/projects/inv,900.Oliver.odt My local file has a line that ...
Stephen Boston's user avatar
0 votes
2 answers
55 views

Control the way git prints file names so that they can be passed to rm?

When I print a file from git using the command, there are edge cases: git diff --no-renames --name-only Edge case 1: spaces (added --diff-filter=D for illustrative purposes) # format 1: unquoted $: ...
Chris's user avatar
  • 821
0 votes
0 answers
19 views

From patch file regenerate a patch to validate a patch successfully push to a git branch

#!/bin/bash set -e git clean --force -dfx git switch --force-create feature-to-review PATCH=001_psql_parse_only.v1.patch PATCH_DIR="/home/jian/Downloads/" PATCH="$PATCH_DIR$PATCH" ...
jian's user avatar
  • 517
0 votes
1 answer
32 views

Add incoming commits to pull request description

I wish to create a pull request describing the incoming commits. Is it possible only through the interface or must I do some coding? My thoughts: Duplicate pull request template with appended _orig ...
Bruno Peixoto's user avatar
1 vote
0 answers
453 views

Unable to git pull with ssh, even with properly configured ssh key

Long short story, when I try to git pull, the following error is showing : $ git pull key_from_blob: remaining bytes in key blob 36 key_to_blob: unsupported key type 9 Permission denied (publickey). ...
Kyrela's user avatar
  • 41
3 votes
2 answers
485 views

Git does not update while doing git clone

I want to update my git version to the latest (2.38.1). This is my version: git --version git version 2.37.1 (Apple Git-137.1) I am following the guide "Git via Git" and so I type: git ...
tail's user avatar
  • 141
0 votes
0 answers
188 views

An attempt at using BASH scripting to login to git and eventually run git commands

I haven't been able to find anyone successfully attempt anything similar so here is my attempt. I am trying to automate logging into GIT so later down the line I can run GIT commands. The idea is: git ...
waterjedi's user avatar
8 votes
2 answers
2k views

How do I get git to use the cli rather than some GUI application when asking for GPG password?

Whenever I try to create a signed git commit, I need to enter my GPG key. It spawns some GUI application to receive the password. It looked like the application was seahorse, so I uninstalled it, but ...
karizma's user avatar
  • 211
0 votes
2 answers
1k views

How to disable Host Key Checking check on git over ssh?

When I want to execute git clone git@github.com:Company/Repo I see this message for the first time after installing a new linux instance: Cloning into 'Repo'... The authenticity of host 'github.com (...
Saeed Neamati's user avatar
0 votes
0 answers
66 views

git tag -l is not showing any result in gitlab pipeline

for few projects git tag -l is not showing any output, However for some projects it returns tags on gitlab pipeline locally on my machine it works for all projects, only not working on gitlab
smital patil's user avatar
0 votes
0 answers
114 views

Git HTTP fatal: repository not found

I'm working on setting up a remote git repository on my homelab network. I have ssh: access working, but I'm having trouble with SmartHTTP. (I want to have done it in case it comes up in a job ...
Darwin von Corax's user avatar
0 votes
0 answers
683 views

Unable to push to SSH Git remote: remote unpack failed

I'm working on setting up a Git repo on my homelab network. I have ssh: working for clone, but I can't push - when I git push --set-upstream origin master I get the message Enumerating objects: 7, ...
Darwin von Corax's user avatar
4 votes
1 answer
1k views

Is it necessary to set the executable bit on scripts checked out from a git repo?

I have some scripts in a folder that I run often. These scripts are updated frequently. To be more specific, every time we do a deployment on our server, we replace the scripts with updated ones from ...
V S's user avatar
  • 43
1 vote
0 answers
27 views

How can I compile TCLAP and link it with CLUSCO?

I need to use an app named CLUSCO, whose git is hosted in BitBucket. This app uses a library called TCLAP, whose git is hosted in GitHub. I tried to follow the installation instruction supplied by ...
user366312's user avatar
1 vote
2 answers
70 views

why the linux source repo modified automatically in macOS 12.5

I am using this command to clone the linux repo in macOS 12.5: git clone https://github.com/torvalds/linux.git but when I using git status to show the repo info, the repo have some modified files: ➜ ...
Dolphin's user avatar
  • 489

1
2 3 4 5
20