git

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

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, instead of matching files. If I complete enough characters such that …

Total answers: 1

git log command not give full commits of all branches

git log command not give full commits of all branches I wanted to see all commits of all branches. so i tried git log , but it gave some results and struck as in below screenshot : Asked By: spylh9999ggr || Source Your git log command pipes its output to a program with the generic …

Total answers: 1

git@github.com: Permission denied (publickey)

git@github.com: Permission denied (publickey) I am currently setting up my continuous deployment (CD) pipeline and first got it running on a VM (VM-1) on my server. Everything worked fine. Now I want to use it on another VM (VM-2) on the same server. I have manually copied the SSH public and private keys from the …

Total answers: 1

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

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 same as that of git-for-each-ref(1). When I look at man git-for-each-ref I find …

Total answers: 1

text formatter that supports bullets

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 in commit messages. For instance: % export PARINIT="rTbgqR B=.,?’_A_a_@ Q=_s>|" % par << …

Total answers: 1

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

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 string with some random text and some changes." # Create a temporary directory temp_dir=$(mktemp -d) # Create temporary files …

Total answers: 1

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

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 application. The recipe …

Total answers: 1

Automatically add ssh key based on directory I'm in

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/bejebeje. Each time I go to work on that project, I …

Total answers: 1

How to fetch from Git remotes without tags?

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 repo Clone your fork Add an upstream remote for git@github.com:cachix/install-nix-action.git git …

Total answers: 1

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

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/origin" repos. As user cake, in /home/cake, …

Total answers: 1

rm -rf .git removed all my folders including the parent folder?

rm -rf .git removed all my folders including the parent folder? I ran rm -rf .git because I wanted to delete the .git folder for this one small test project. and then do a git init again. See the attached screenshot with my command history. Today I realized my entire src folder (the parent folder …

Total answers: 1

Alias for git commands

Alias for git commands Most of the time, I use these git commands : git add src/ package.json git commit -m "custom message" git push origin "name_of_the_branch" So I want to make a single alias command which should look like: git_alias src/ package.json && "custom message" && name_of_the_branch By running the above alias, it should …

Total answers: 3

Get total Git LFS size

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 (110.2 MB) 295442cd34 – "folder/(120 MB).zip" (110.2 MB) 680bb2ab19 * test.txt (5 B) Note: …

Total answers: 1

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

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 function to make gc and all text following …

Total answers: 1

Dark mode on Xournal++

Dark mode on Xournal++ Recently I installed Xournal++ in Ubuntu. I came across this link for a cool nord theme. I tried to install this to my Xournal++ application, but I am a complete newbie to both Linux and GitHub so I have zero idea about what to do. I did however install the Git …

Total answers: 1

Why git authentications works through SSH keys?

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 cryptography methods? We are not even connecting to remote a machine’s terminal, …

Total answers: 1

How to combine tr with xargs and cut to squeeze repeats

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 …

Total answers: 2

Automate when create new git branch

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 git checkout -b test1 I can quickly get local as latest as remote (master branch) then I do new changes. How to …

Total answers: 1

How Linux kernel is synchronized with Ubuntu?

How Linux kernel is synchronized with Ubuntu? As Ubuntu uses Linux kernel. Since Ubuntu has his own git repository while Linux kernel has its own repository. So can these two different GitHub repo is in sync. Can someone explain? These questions can be further apply on mint which Ubuntu derivative? Asked By: Sardar Badar Saghir …

Total answers: 1