Skip to main content

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
1 vote
0 answers
11 views

heptapod: include version number in file name?

I'm trying to maintain an install script for Tryton ERP at Tryton community. I'd find it useful to have a version number in the file name; to manage this, when committing I'd like to have a prompt to ...
herrdeh's user avatar
  • 11
0 votes
1 answer
21 views

Track my slight changes to an external git repository I cannot push

I would like to use the code stored in an external git repository (I mean I am not a contributor for this code, I cannot push or create branches) but of course I need to change some files before ...
fangorn's user avatar
  • 23
0 votes
0 answers
18 views

how to check the multi remote repo new commit when using git commit

I have a project with multi repo, when I commit with one of them, I just want to make sure each of the repo are newest, because the repo have some dependencies, I want to fetch all repo changes and ...
Dolphin's user avatar
  • 607
0 votes
0 answers
27 views

How to set up 'git push remote master' to automatically update files on production web server?

I have my website running on a remote server with gunicorn/nginx. The nginx runs from /var/www directory and its owned by root:www-data drwxrwxr-x 5 root www-data 4096 Apr 8 17:32 www I also ...
user1933205's user avatar
0 votes
1 answer
11 views

git diff tab completion of tags hides file name completion (using bash)

I am using git on Ubunto with bash shell, and a tab-completion using bind '"\t":menu-complete' in my .bashrc file. When I do git diff X, tab-completion starts cycling with matching git tags, ...
Itamar Katz's user avatar
0 votes
1 answer
35 views

How can I change the output colors of `git branch -vv`

I see that it takes a --format argument: --format <format> A string that interpolates %(fieldname) from a branch ref being shown and the object it points at. The format is the ...
Franklin's user avatar
  • 235
0 votes
0 answers
396 views

Getting error when i load SSH key "Load key "/root/.ssh/id_ed25519": error in libcrypto"

Long story short I have an SSH key pair that I am copying to a new machine from a shared drive whenever the machine starts but when I load in the keys I keep getting an error. There is no difference ...
no nein's user avatar
  • 101
2 votes
1 answer
47 views

text formatter that supports bullets

I am looking for a formatter to use with my git commits. par pretty much does what I want, with the (important) limitation that I can't get it to properly format bullet lists, which are pretty common ...
m000's user avatar
  • 181
0 votes
0 answers
38 views

git cli language default to first non english value

I have my computer language set to en_GB with fr_FR as backup only for spellcheck and money/measurement formatting purposes. CLI apps work fine like that except git, who insist on using the first non ...
5th's user avatar
  • 1
0 votes
1 answer
51 views

How can I call git's built-in diff command directly after configuring a different visual "git diff" substitute?

I have configured git diff to be a command that calls substitute diff for viewing file differences i.e /usr/bin/vim -dR "$2" "$3" and that doesn't work when I want to create a ...
vfclists's user avatar
  • 7,619
0 votes
1 answer
73 views

Performing character-level comparison of "strings" without explicitly creating temporary files for git diff

Referring to this https://stackoverflow.com/a/31356602, I wrote this code: #!/bin/bash # Define the two strings to compare string1="First string with some random text." string2="Second ...
Gabriele's user avatar
  • 333
0 votes
1 answer
158 views

.Files.Glob pattern for a helm configmap

I have directory structure like this $ tree . . ├── Chart.yaml ├── datafiles │   ├── index.html │   ├── style.css │   ├── exclude.txt │   └── text │   ├── file1.txt │   ├── file2.txt I want ...
Sollosa's user avatar
  • 1,941
0 votes
1 answer
61 views

How to add an exact-match flag to the following git + sed function?

I want to create a bash function where you can do a sed find and replace while ignoring the files and folders in .gitignore. I also want to be able to add any git grep flags to the command. For ...
wyc's user avatar
  • 143
1 vote
0 answers
423 views

Why is my `git diff` now showing old mode and new mode instead of the differences in values of my local branch vs. master branch?

When I used to run git diff requirements.txt for the longest time it would show me the difference between the value of requirements.txt in my local git vs. master branch. But now when I run it, I get: ...
Patrick_Chong's user avatar
0 votes
1 answer
42 views

Git can't run editor but it definitely exists

I've run into a very strange problem where Git says it start can't my editor, even though it definitely exists and works: $ git config --global core.editor /usr/bin/nano $ git rebase -i main hint: ...
Timmmm's user avatar
  • 596
0 votes
0 answers
31 views

Display a git branch in a subdirectory of heads in the bash prompt

I can display my current git branch as long as it's not in a subfolder of heads, but when I go into a sprint/issue branch it no longer displays. I would like to be able to display these in addition to ...
meetra's user avatar
  • 1
0 votes
1 answer
76 views

Git LFS doesn't work anymore with our Yocto: git doesn't fetch "large files" since we upgraded our tools

Git LFS doesn't work anymore with Yocto: git doesn't fetch "large files" since we upgraded our tools to these versions: Yocto kirkstone gitlab 16.7.3 and gitlab 16.8 git version 2.34.1 git-...
Jean-Loup Sabatier's user avatar
0 votes
1 answer
185 views

In a yocto recipe, what selects the release to download from the GitHub repository?

I'm using yocto to build my custom Linux distribution. I need to add hiredis to my distribution. hiredis is a minimalistic C client library for the Redis database, and I need it to access Redis by a C ...
User051209's user avatar
0 votes
1 answer
107 views

Automatically add ssh key based on directory I'm in

I have two GitHub accounts. One for personal use, and another for business. Each is set up with its own SSH key gh_personal and gh_business inside ~/.ssh. I have a personal project that sits in ~/code/...
J86's user avatar
  • 383
0 votes
1 answer
218 views

How to fetch from Git remotes without tags?

git fetch --all --no-tags doesn't do what it says on the tin, and keeps re-fetching tags every time I run it. How do I actually fetch from all remotes without fetching tags? To reproduce: Fork this ...
l0b0's user avatar
  • 51.6k
0 votes
1 answer
281 views

After `su user`, getting `fatal: failed to stat : Permission denied` with `git push`

There's a lot of setup for this question: I've got a host (rpi5.local) with 2 user accounts: pi and cake. I wanted to explore git, and I created the cake account to "own" the "server/...
Seamus's user avatar
  • 3,012
0 votes
2 answers
552 views

Bash script for sending passphrase to unlock OpenPGP secret key

Ubuntu 22.04.1 LTS When I do a git push REMOTE after a reboot, after a few seconds it comes up with a dialog box: +---------------------------------------------------------------+ | Please enter the ...
Strider's user avatar
1 vote
0 answers
174 views

ssh hanging when adding -T parameter with specific router

I'm having a very strange problem. From a couple of days I'm having problems with git, ssh and vpn but only when using amazon eero router. Using my smartphone hotspot or even just connecting directly ...
Skato's user avatar
  • 11
3 votes
1 answer
254 views

Locally built Git install can't connect to remote repos - missing remote-https

I'm trying to get Git working on an ancient Gentoo Linux box which I don't have root/elevated rights for. I figured I should be able to build and install Git locally in my ~/bin folder, whilst I can ...
Eddieddieddie's user avatar
0 votes
0 answers
65 views

Enable filepath autocompletion when adding files with Git in Zsh

Let's say following is the output of my git status command. On branch LG-201 Your branch is up to date with 'origin/LG-201'. Changes not staged for commit: (use "git add <file>..." ...
Kartik Chauhan's user avatar
0 votes
0 answers
62 views

How do I backup only my own modifications to a git repository?

If I download some repo off the internet, let's call it "somerepo", then create a "mods" branch and make several commits to that branch, how can I backup only my mods, so that ...
mo FEAR's user avatar
  • 192
0 votes
1 answer
41 views

Efficiently Tracking and Updating configs (dotfiles) from Multiple GitHub Repositories

I'm tracking several GitHub repositories, from which I often fetch configuration files for tools like mpv and hyprland. Given that these repositories frequently receive updates, I'm seeking a more ...
Phoenix's user avatar
2 votes
1 answer
487 views

Get total Git LFS size

How can I get total size of Git LFS files? I can get a listing of LFS files with git lfs ls-files --size: b1d5dd29dd - file1.zip (1.42 GB) 27d3073f43 - file2.zip (120 MB) cacd6dbfe3 - folder/file3.zip ...
wjwrpoyob's user avatar
  • 440
0 votes
0 answers
31 views

How to tell git to use local files in relation to remote refs for tracking my dotfiles

I’m using git to maintain my Linux “dotfiles”, which contain files from my /home, my /etc, and some entries I manually created in /boot (for systemd-boot). I’m also tracking these using a bare git ...
Frontear's user avatar
0 votes
0 answers
118 views

User suddenly changed to nobody, and is restored when changing permission to a file

I was learning about git internals, doing basic commands, when suddenly I encountered this error: fatal: detected dubious ownership in repository at... I then noticed that the user is nobody. I have ...
ArziousYi's user avatar
0 votes
0 answers
76 views

Leave specific file on server when running bitbucket pipeline using rsync

I have a bitbucket pipeline setup to rsync to a server that hosts a Wordpress Site. The files on the server initially have a skeleton Wordpress site with a wp-config.php & wp-config-sample.php but ...
Toby's user avatar
  • 1
0 votes
1 answer
68 views

Unable to clone using git in Linux Mint using my custom key

In my pc I setup a file named ~/job/ssh/config Host bitbucket HostName bitbucket.org IdentityFile ~/job/ssh/rsa_key user git IdentitiesOnly yes and in my ~/.ssh/config ~/.ssh/config Include /...
Dimitrios Desyllas's user avatar
1 vote
1 answer
176 views

Run `git commit -m` with single quotes in zsh

I sometimes use characters such as ! and $ in commit messages, they need to be manually escaped, but not if you use single quotes like this git commit -m 'My $message here!'. I tried to write a ...
Justin Breen's user avatar
-1 votes
1 answer
77 views

Why git authentications works through SSH keys?

Question in the title, but let me detail more. Excluding the ID/Password method on git CLI, we generate a SSH key and add the public key to the remote server. Why don't we have SSH-less public-key ...
izarc's user avatar
  • 13
1 vote
1 answer
1k views

Unable to get ssh-agent and ssh-add to work in remote server

We have a remote server which we use to build a certain part of our software. Part of that build process needs access to a private bitbucket repository. Normally in my local machine I have set the ....
Corcus's user avatar
  • 111
0 votes
0 answers
20 views

git format patch --text option and best way to avoid whitespace error

git format-patch -1 --text --start-number=4 --reroll-count=4 --diff-algorithm=patience https://git-scm.com/docs/git-format-patch --text Treat all files as text. I am now only deal with ascii text ...
jian's user avatar
  • 577
0 votes
1 answer
231 views

How can I tell git (in WSL2) to continue using the main network and not the VPN?

I work with git in WSL2 (Ubuntu) on Windows and with a bitbucket hosted repo (it's on the Internet) and normally everything works fine. But the moment I connect my Windows machine to the company ...
Eden's user avatar
  • 1,191
0 votes
2 answers
125 views

How to combine tr with xargs and cut to squeeze repeats

The top answer to this question demonstrates that cut can be used with tr to cut based on repeated spaces with < file tr -s ' ' | cut -d ' ' -f 8 I want to get the remotes of several Git repos in ...
Anil's user avatar
  • 221
0 votes
1 answer
58 views

Local Git multi users issue

I have a local git version control installed on RedHat 8 server, and when I run git add * it asks me to provide the sudo permissions which is sudo git add * and this makes the add run with the root ...
Mohamed Eleraqy's user avatar
0 votes
0 answers
309 views

Compile git for /lib/ld-linux-armhf.so.3 from vm that links with /lib/ld-linux-aarch64.so.1 by default

I'm building git from source from a debian 10 vm that has /lib/ld-linux-aarch64.so.1, which ends up linked in the git binary after a basic NO_TCLTK=true make prefix=$(pwd)/2.41.0/arm make all and ~ ...
bpstrngr's user avatar
  • 101
0 votes
1 answer
53 views

How to set `.gitignore` so that `../../.aws/` is excluded from `git status` output?

My .gitignore file is instructing to ignore the ../../.aws/ directory: $ cat .gitignore coredumps/ ../../.aws/ .*.sw* *bak *log Alas, that instruction is ignored: $ git status | head -6 # On branch ...
boardrider's user avatar
0 votes
0 answers
53 views

Git credential manager to store credential from salsa.debian.org

I am cloning multiple repositories from salsa.debian.org with https, I am wondering how I can use git credential manager to store the password for this site? Every 100 or so repositories that I clone, ...
nerd's user avatar
  • 101
1 vote
1 answer
133 views

prompt in git hook?

I'm trying to implement an option to skip a pre-commit hook (which will be considered pass and perform the commit) in a pre-commit hook. Everything is running fine except the prompt which reads an ...
Tomáš Pilný's user avatar
0 votes
1 answer
91 views

Problems with git commands in a bash script on runs following the first

I'm strugling with a script to backup config files from root folder that copies the file inside a folder in myuser directory, reproducing the original path structure, adds the file to a git repo and ...
Alexander Beerhoff's user avatar
1 vote
2 answers
360 views

git autocompletions in Fish: how can I disable them or speed them up?

I'm running Fish shell (3.6.0) on Ubuntu. Let's say that I'm trying to run git add foo/bar.txt . I type: git add foo and then I press tab . Now the shell freezes up for a few seconds. Even pressing ...
Flimm's user avatar
  • 4,238
0 votes
1 answer
74 views

Automate when create new git branch

https://wiki.postgresql.org/wiki/Working_with_Git#Using_git_hooks I want to quickly test my idea (fail fast). So whatever I changed, committed to the local branch. then I switch to a new branch using ...
jian's user avatar
  • 577
1 vote
0 answers
1k views

Ubuntu 22.04 ssh-agent identities not added correctly?

I have my ssh identities added at the end of the .bashrc script, as the server says here when I log in, Agent is running with pid 8411 and all of the identitias are added. As is also evident from the ...
Matt Welander's user avatar
0 votes
1 answer
87 views

Should I use `set -u` in my terminal? Why does it break autocomplete for git?

I added set -u (equiv. set -o nounset) to .bashrc, but now some tab autocompletes fail with errors about unset variables. One example is for git autocompletes. Would this be a git autocomplete bug or ...
Jeremy Hunt's user avatar
0 votes
0 answers
45 views

Manjaro / Plasma - CPU cores overload and get stuck at 100% one by one when cloning a big git repo

First of all, I'm not a linux expert, I'm trying to figure out as I go but sometimes it's more than I can handle. I've been trying to get a manjaro 22.1.3 (Talos) (kernel 6.1) to work for about a week ...
his dudeness's user avatar
0 votes
1 answer
95 views

bash script to backup config file inside git repo reproducing its path

I want backup some config file in a git repo inside my home; earlier I've been using work-tree=/ but i don't like this solution anymore. Now I'm trying to create a script that take a given config file,...
Alexander Beerhoff's user avatar

1
2 3 4 5
21