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
0answers
9 views

Deploying website backend files to webserver from git repo

We are trying to improve the management of our website backend files, and are planning to deploy (using git pull) the files from the git repo (hosted on a local (within our organisation) GitLab server)...
0
votes
0answers
18 views

Http git Repo Authentication

<VirtualHost *:80> SetEnv GIT_PROJECT_ROOT /var/www/git SetEnv GIT_HTTP_EXPORT_ALL DocumentRoot /var/www/git ScriptAlias / /usr/libexec/git-core/git-http-backend/ <Directory "/usr/...
2
votes
2answers
477 views

How to add an alias for 'git add **/'

I can't seem to add an alias for git add **/ I think those two asterisks is causing an issue, or it could be that forward slash. How do I solve this? So far I have tried alias ga='git add **/' When ...
1
vote
3answers
30 views

How to check if a directory is in a git working tree when that directory is not the current working directory?

I can test if the current directory like this: [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == true ]] && echo yes ..but how can I do the same for a directory that is not the ...
0
votes
1answer
36 views

How can I get rid of this error when apt update and instal git

I'm new in Linux and i am using Ubuntu 20.04.2.0 LTS. I am tring to install git with following steps in this site. When I run sudo apt update or sudo apt-get update command that returns this errors: ...
0
votes
0answers
42 views

Why is git bash so slow to give me a command prompt and how can I fix it?

I used tcsh for decades on cygwin and just started using git-bash on my new Windows PC. It's generally a step up but the time from when the last command finishes until I receive the next command ...
0
votes
0answers
14 views

How to replace duplicated multi-line groups, e.g. from git & diff3

I'm rebasing legacy code, and finding lots of conflicts caused by scripts -- usually code formatters. The changes are simple and predictable, so I can trivially re-run the script to apply the changes ...
1
vote
2answers
48 views

Display git-diff between master and my last commit

I use git on a regular basis for collaboration with other people. When we work together on a shared repository, I'd like to be able to view the changes performed by others which happened between my ...
0
votes
1answer
11 views

.Xauthority, .asoundrc, .bashrc appear out of nowhere in Git repositories

The files .Xauthority .asoundrc .bashrc appear out of nowhere (I don't know when) in Git repositories. The files are not managed by Git. One of the repositories is cloned from GitHub, the other was ...
0
votes
1answer
19 views

How can i merge dotfiles by bash script file

i found this best way to merge branch to master in stackoverflow git checkout master git pull origin master git merge test git push origin master i tried merge git --bare repo by shell script: #!/bin/...
2
votes
1answer
59 views

How to backup local git repo the right way in a single file?

The title seems a bit weird, so a bit of background: I got a couples of local git repos, and found myself wanting to make a backup. Two method came to mind, git bundle and tar (aware there many other ...
0
votes
1answer
9 views

ghost command error

I cloned it. git clone "https://github.com/EntySec/ghost" Then, I installed ghost cd ghost/ chmod +x install.sh ./install.sh I wrote help for Core Commands But, there's no connect command ...
0
votes
1answer
69 views

Cannot Install Git Because Libc6 Package is Broken

I am running debian 10 on the chrome os container. I have attempted to install Git to the latest version however, I get this error: The following packages have unmet dependencies: git : Depends: ...
0
votes
1answer
89 views

gpg failed to sign the data, failed to write commit object

I have searched the whole universe this error but i could not find any helpful tips. I have created a key using keybase and added my public key to github gpg my gpg --list-secret-keys --keyid-format ...
0
votes
0answers
15 views

Removing / reversing git am patch

I applied a patch with command git am patchfile and I would need to remove it and clean my tree before reapplying it, idea how to do it ? thanks I am working on openwrt build
0
votes
0answers
26 views

Error installing packages on the user account with curl and git

I just installed Arch, and and a few Arcolinux spices here and there and configuring my fresh install I have noticed that when i use curl as a regular user in gives me an error like: $ sh -c "$(...
0
votes
3answers
59 views

sed replace characters in capture group

I've got this, which almost does what I want git show-branch --current $SHA1 \ | sed --quiet --regexp-extended \ 's/^.*\* \[[a-z]+\/(B-[0-9]+)-([a-z0-9-]+)\].*/\1 \2/p' \ | sed --quiet 2p and ...
0
votes
0answers
21 views

Conditional Git alias within zsh: “parse error: condition expected: cd” [duplicate]

I'm trying to implement a simple stack of git-related aliases for my personal dotfiles. alias gs="[[ $(git rev-parse --is-inside-work-tree &> /dev/null) ]] || cd $D && git status -...
0
votes
1answer
16 views

Not changing permissions as root on git pull

I've been managing a not very big system for a few months now and there are still a couple of issues that I don't like how they're being dealt with right now. Currently, there is practically just one ...
3
votes
1answer
42 views

Not consuming STDIN causes curl error

I have set up a post-recieve hook for Github. It will issue a POST-Request to an Apache cgi-script, which then is supposed to download the changes to the repo into the locally cloned bare repository. ...
1
vote
2answers
1k views

ssh in fedora 33 error sign_and_send_pubkey: no mutual signature supported

I tried to clone a git repository after a migration from centos to fedora 33, then I got this error: git clone git@bitbucket.org-xxx:abc/myproject.git Cloning into 'myproject'... sign_and_send_pubkey:...
5
votes
1answer
128 views

A very strange behaviour of filesystem, Schrödinger's file

I'm fresh to Unix, and I would like to have your help with this strange behavior I have a user directory /Users/den den$ ls -la total 208 drwxrwx---+ 19 den staff 608 18 Jan 16:35 . drwxr-xr-x ...
9
votes
2answers
250 views

gitk crashes when viewing commit containing emoji: X Error of failed request: BadLength (poly request too large or internal Xlib length error)

I'm able to open gitk but it crashes as soon as I open a commit whom changes contains an emoji (not the commit message). Error ❯ gitk --all X Error of failed request: BadLength (poly request too ...
1
vote
2answers
102 views

grep within a git diff, but show file and line number

When I'm working on a branch, I want to quickly jump to my "TODO" comments. This means I only want "TODO" comments that were added on my branch (ignore the ones in master) I want ...
1
vote
1answer
58 views

accessing git-annex special remote from new repository

I'm using git-annex in version 7.20190129 as it is provided on my Debian Stable (Buster) machine to keep big files under version control and have them distributed over multiple machines and drives. ...
1
vote
2answers
157 views

How to concatenate “$@” or array to one string [duplicate]

I am trying to implement this helper bash function: ores_simple_push(){( set -eo pipefail git add . git add -A args=("$@") if [[ ${#args[@]} -lt 1 ]]; then args+=('squash-...
9
votes
2answers
783 views

zsh prompt: check whether inside git repository and not being ignored by git

In my zsh shell, I am dynamically changing prompt depending on whether I am inside git repository or not. I am using following git command to check: if $(git rev-parse --is-inside-work-tree >/dev/...
1
vote
1answer
32 views

I am trying to execute a script that pushes to git every x minutes as a service, but git uses 100% CPU and high amounts of RAM

I am trying to execute a script that pushes to git every x minutes as a service, but git uses 100% CPU and high amounts of RAM while seemingly doing nothing. (I checked after 8 minutes and it was ...
2
votes
1answer
41 views

What is the right way to store BitBake configuration under git?

What is correct way to keep track of bitbake configuration and used layers in git?
1
vote
1answer
21 views

Add a delay in git post-merge

My scenario is as follows: After updating files on my Git repository, I have a Git hook that calls an API from my web server. This API performs a Git pull and then I have a Git hook post-merge that ...
0
votes
3answers
56 views

grep has different result in terminal command line and bash script

I have a bash script that uses grep to screen out file with certain extensions and under certain directories. The script looks something like follows: generate_exclud_extensions() { echo "\&...
0
votes
0answers
22 views

What is causing this .git folder with files called .git_high_size?

I deleted a large .git folder in the root html directory, as I wasn't using .git and it must have been a carry over from a server move. Now, a directory called .git_high size has created itself and is ...
0
votes
1answer
71 views

Create/Upload personal projects in a specific GIT folder (each folder has its own “.git”) LOCAL SERVER GIT

I am creating (on a personal local server) a git server where I will upload all my projects inside. The structure will be as follows: myprojects dir_project1 dir_project2 .... Now I'm ...
2
votes
2answers
47 views

Is there any git option to automatically merge commits from master branch into a feature branch?

I have a feature branch in git that needs to be up to date with the master branch at all times. Is there any way to automatize this in git? I basically want on every commit in master branch a merge ...
0
votes
1answer
51 views

how to fetch the remote repository of a remote repository which is not checked out in git

Is there a way to fetch the remote repository of a non-checked-out remote repository with git? I have the dotfiles on my remote PC under version control (using yadm). This repository is cloned on my ...
0
votes
1answer
35 views

Failed attempt to expect and send

I'm trying to write a script which git clone. my script: git clone ssh://git@domain.com/myproject.git expect "Enter passphrase for key..." send "myPassword" read -p "enter...&...
0
votes
0answers
223 views

Cloning a repo -> “gpg: Can't check signature: public key not found” & other syntax errors

I have been running into some basic issues and it's just getting to a point where even after trying out different things by looking up isn't doing any good, so here I am to get some insight from you ...
1
vote
1answer
67 views

git checkout — file changes permissions for existing file

When I edit a file, and then want to undo my changes, I use git checkout -- file.txt the problem is that git does not keep the file permissions of the existing file. file.txt has permissions 644, but ...
0
votes
0answers
16 views

scp copied file to flash memory of embedded device with zero return code, but file contains lots of zeros(garbage) at the end

In my current project we are constantly deploying a large squashfs to an embedded device with scp. The scp commands returned with return code of zero in all cases. But still, the file found on the ...
0
votes
0answers
37 views

Slow hostname resolution for SSH(git)

Strangest thing. After upgrading to Fedora 33, the git fetch, push and pull commands are SLOW. I've been able to get a bit of trace and debug info using the following command: GIT_SSH_COMMAND="...
0
votes
1answer
30 views

Git lists my LICENSE and README as removed, but they are still there?

thanks for reading! I was starting to setup my dotfiles configuration with git and GitHub and came across a problem: I am using my $HOME as my git work tree and have the .git-directory in my $HOME/....
0
votes
0answers
134 views

git ls-remote ssh:// and credentials

git (2.29.2), is there a way to prevent the git ls-remote ssh://user@host:port/dir.git command from asking for the password? I can't use public keys, the repositories are on a NAS which only allows ...
1
vote
1answer
58 views

How can I keep the color output of git status when piping it through grep?

I'm trying to compress the output of git status a bit, for a "system status" script that runs whenever I log in to an ssh session. I'm hoping it'll nag at me and encourage me to commit more ...
0
votes
0answers
13 views

How to create and 'register' new files inside symlink folder

I created symlink folder and I want to create some new files inside, the problem is they are not 'propagated'/'registered' inside the real folder, if you know what I mean. I need to go to the original ...
1
vote
2answers
35 views

How to operate on default branch within gitconfig and shell scripts

With the big move from master as the default branch name for git in many projects (e.g. to main in GitHub), some of the scripts and configurations assuming it as the default name will be broken. For ...
0
votes
1answer
62 views

Cat all the files in a git repo without cloning

Is there an existing tool which will do something like this: git-cat https://github.com/AbhishekSinhaCoder/Collection-of-Useful-Scripts then it will run cat on each file in the repo? Something like ...
0
votes
1answer
28 views

command -v <foo> returns wrong result after overwriting <foo> as function

I have the following functions in my .bashrc which just creates a python project with venv and creates gitignore and readme, after I initialise with git as: git init python ...
7
votes
2answers
781 views

Creating a new user breaking existing permissions

I have a machine running Ubuntu with a SSH config file in ~/.ssh/config with the following permissions (default when creating a new file) -rw-rw-r-- 1 dev dev 75 Oct 26 20:13 config After creating ...
0
votes
0answers
79 views

git web backend not allowing me to browse git projects

I am running a git server on CentOS 7. The apache we server is running on port 88 and I am able to clone and update my files through the cli using http on port 88. So the server itself is listening ...
0
votes
0answers
26 views

Terminal - Give credentials in terminal without GUI

I'm on Arch Linux, Cinnamon Desktop environment, having Bash as my default shell. Recently, when I commit changes on Git, Bash prompts a window asking for credentials while a few days ago no GUI ...

1
2 3 4 5
17