153,748 questions
1
vote
1
answer
75
views
Git is not making a conflict when I think it should be
I am learning how to deploy a django website and for that I have 2 copies of the code in 2 Git branches one for developing (master) and the other for deploying (deployment) with differint ...
6
votes
1
answer
272
views
Creating git subtree repo that can import Python files as from "fake" namespace
tl;dr: What are the minimal changes needed to make a standalone folder work in Python runtime, and get modules resolved in VS Code, as though it's part of a parent module namespace? Simple example at ...
-6
votes
1
answer
101
views
How to create new orphan git branch and keep only one folder? [closed]
I tried this
git checkout --orphan newfeature/lk1
Inside I have
A,B,C....
my goal was delete all except the one,A
find . -name A -prune -o -print0 | xargs -0 rm
It did not work for me.
I am using ...
0
votes
0
answers
50
views
Parameter overrides stored in git, Helm, and multiple sources
We always use multiple source Applications to keep charts and values separate, and we do everything through git.
I'm playing with argocd-image-updater, and because of the above I need argocd-image-...
1
vote
1
answer
229
views
How can I undo pushing 12k duplicate commits to GitHub if I can't fix the local state?
Somehow, I got myself in a situation where my local branch and the remote one diverged, not only for commits on the branch (as a git rebase could do), but also for commits on main going back 9 years:
$...
3
votes
1
answer
188
views
Inconsistency in the way aliases are parsed in .gitconfig
I got an error two hours ago from this alias in the .gitconfig file, which is:
[alias]
chist = log --graph -10 --pretty=format:"%C(cyan)%h%Creset %<(20,trunc)%s %Cgreen%<(11,trunc)%an%...
-2
votes
2
answers
131
views
How to Use git diff to Show Specific Line Ranges (e.g., Lines 1–10 and 48–69) for a Commit
I want to prompt users in the documentation to directly review the message of a specific commit.
So, I’d like to use the git diff command, as shown below:
git --no-pager diff 0847759b^:path/a.cpp ...
-3
votes
1
answer
63
views
Rebasing all branches on new initial commit [closed]
I am in the process of migrating an existing SVN repository to a git repository, which will be managed by Gitlab.
The conversion itself works, I was successful using various versions of svn2git.
In ...
0
votes
1
answer
85
views
Is the fix from commit 3995472 included in version 1.0.0 of redis-om-spring? [duplicate]
I’m using redis-om-spring and came across this commit:
3995472c39f661a21b5e81c063aa90b51c26073d
This looks like a fix I need, but I’m unsure if it is already part of the 1.0.0 release of redis-om-...
0
votes
1
answer
100
views
Add commit to an already-merged branch
This is my project's log:
nubarke@linux0:~/CLionProjects/untitled$ git log --graph --all --oneline
* 3ee3af6 (HEAD -> master) Rename project to Hard Disk Drive Stress Test
* 36f6c14 Off-by-one ...
4
votes
0
answers
196
views
How to make GPG make a GUI password popup when doing the Git commit signing
Every time when I was doing the GPG signed git commit (e.g. git commit -S -s -m "test"), the password prompt is in the CLI console. The password prompt before was a proper GUI pop up window ...
4
votes
1
answer
224
views
Why can't I create a lightweight Git tag?
I cannot create a lightweight tag in Git, only annotated (as I understand).
I use the command:
git tag v15.0
This should create a lightweight tag without any metadata, but instead it asks me for a ...
0
votes
2
answers
143
views
Using bash variables instead of files as input to git commands
I have a script which sets useful git settings and aliases, and I want to end by printing the difference between git config --global --list before and after. I'd like to show the diff in the same ...
0
votes
1
answer
116
views
When does git stash pop/apply cause conflicts?
I understand how Git detects conflicts in some other commands:
git merge – Git finds the merge base (last common commit) and checks which side has made changes. If both sides changed the same lines, ...
3
votes
1
answer
166
views
What is the "git+ssh://" protocol? Is it different to just "ssh://"?
Git supports three different syntaxes for specifying an SSH-based remote. I can use a URL with the git+ssh protocol, like this:
git clone git+ssh://[email protected]/torvalds/linux
... or one with the ...
-2
votes
1
answer
57
views
github access with ssh [closed]
My github account was forced to use 2FA some time ago, maybe a year, whatever. Since then I have changed my mobile ph # and can't get text on the # github has attached to my account. I think I know ...
0
votes
0
answers
99
views
Jenkins pipeline - Cannot run program "" (in directory "/var/lib/jenkins/caches/git-xxxxx"): error=2, No such file or directory
Currently I have this issue within my Jenkins pipeline. Here is the context.
I am setting the Jenkins server in EC2 instance and docker container as an build agent. within this one, I install docker ...
2
votes
1
answer
133
views
Why can I not override dubious ownership for a GitHub workflow?
I am trying to set up a GitHub workflow for build the docs and keep on getting this issue.
Run ad-m/[email protected]
/usr/bin/docker run ...
Push to branch gh-pages
fatal: detected dubious ...
0
votes
0
answers
48
views
Split git LFS upload into parts
I'm trying to git push huge file by git lfs, to a server using Cloudflare tunneling. Cloudflare has per-request timeout of 100s, which is not enough to transfer whole file, which causes 524 http error ...
0
votes
2
answers
71
views
How can I switch an account in Git credential helper? [closed]
I've used account A for some time, but now I need to change to account B. I do not need to save credentials for A. I saved the account A credentials with following command:
git config --global ...
1
vote
2
answers
120
views
How do you use just one folder from a repository as a submodule?
I have a repository which needs just one folder from another, but it needs to keep updating when the other repo changes, so I plan to use a submodule, but how do I take just the singular folder?
This ...
-1
votes
1
answer
87
views
How can I modify a git branch merged from multiple other branches, then propagate the changes back to the correct origin branches?
I have a dozen feature branches that I would like to manually test at the same time by merging them into a single test branch, to avoid repeating the overhead of setting up the test environment for ...
0
votes
0
answers
74
views
Gitlab runner cannot access git repository SSL: CERTIFICATE_VERIFY_FAILED
I tried using a Docker image called "CodiumAI PR-Agent," which can perform code reviews using AI.
To set this up, I installed GitLab Runner on a new server and created a .yml file according ...
4
votes
1
answer
114
views
.gitattribute file not working as expected
I have the following .gitattributes file in my project
*.txt -diff
This works as expected, it ignores .txt files when I do a git diff. However when I change this to
*.txt diff=test
and add
[diff &...
-1
votes
1
answer
106
views
Creating new empty branch for major refactor
I have a Git repository with a Python project that performs some data transformation.
This repo also includes files that I don't want Git to track, like:
files where I just want to try out stuff, ...