153,709 questions
0
votes
0
answers
18
views
How to find children of each node using git log
I am currently working on GitGarden, a CLI tool that draws your repos as plants. I want the branching/forking of Github repos to be mimicked in my program, like how trees branch off in real life. To ...
-4
votes
0
answers
46
views
The process cannot access the file .... because it is being used by another process [closed]
I am working in C# web app and everytime that i merge the Project (because new files are being added) i have to close Visual Studio and re open it again so it can be accepted.
Is there any way to ...
Best practices
2
votes
5
replies
36
views
Is a feature → develop → main workflow with merge commits expected to produce many merge commits?
I am validating whether the following Git workflow produces the expected commit history.
Branching model:
- feature/* → develop → main
Workflow:
1. Create a feature branch from `develop`
2. Commit ...
Best practices
0
votes
2
replies
19
views
How to build crash-resumable, deterministic workflows in Python without a full workflow engine
I’m building a backend workflow runner where each job is a sequence of steps (mix of pure compute and side-effects like HTTP calls, DB writes, file uploads). If the process crashes mid-step, the job ...
-2
votes
1
answer
50
views
SVN Git migration [duplicate]
I'm trying to migrate a SVN repository to GitLab where the SVN trunk becomes the Git master branch and a specific SVN branch becomes a Git branch.
I'm using git svn clone to pull the repository from ...
-3
votes
1
answer
60
views
How to effectively manage syncs between master and feature branch with different set of reviewers? [closed]
Given:
The master branch
other branches are merged to it through Pull Requests
The feature branch
the admin can push or force push to it directly
the admin either merges master into it and pushes ...
1
vote
1
answer
38
views
GIT submodule active state is not working properly
I have an repo in which have several submodules. One of them has active = false in .gitmodules. As in documentation I would expect this submodule will not be initialized during git submodule update --...
5
votes
0
answers
78
views
Github Actions self hosted runner on macOS tries to checkout repository forever
I am experiencing an issue on macOS where two or more jobs running actions/checkout at the same time cause one of the jobs to hang indefinitely during checkout.
What makes this even stranger is that ...
-1
votes
0
answers
58
views
.NET Template - How to automatically run git init and initial setup script after template creation?
I've created a custom .NET Template for Clean Architecture and I want to automatically initialize a Git repository and run setup scripts after the template is created.
Current Setup
This is my ...
0
votes
0
answers
45
views
Flutter `build_runner` error: `BuildForInputLogger` missing `Logger.onLevelChanged` implementation due to dependency conflicts
Flutter build_runner error: BuildForInputLogger missing Logger.onLevelChanged
I’m working on a Flutter project (git-touch-rebrand) and I’m encountering an issue when trying to run:
flutter pub run ...
Advice
0
votes
1
replies
37
views
Reduce gitlab repository size
I am relatively new in using git, so apologies if this is a stupid question. I am a developer of a certain git repository and I have been working on my own branch. I accidentally committed large data ...
-5
votes
1
answer
82
views
I am unable to push to github and I get error 403 [closed]
I started a new repo in github and began working on it; however for some reason whenever I wanted to push my commits with git push origin main
I wound up with this:
remote:
Permission to [myusername]/...
Best practices
0
votes
2
replies
48
views
How do I rebase a fork of a fork in Github? Should I?
I have forked a project (B) in GitHub that is itself a fork of a project (A), like this:
Project A last updated 10 years ago
Project B forked from A 2 years ago and added some functionality I need ...
0
votes
0
answers
49
views
Apache GIT Workflow
I host several websites using Apache on a Linux compute box in the cloud. I have been playing with the idea of just making each virtual host a GIT repository and updating it every time I need to. Is ...
0
votes
0
answers
36
views
SourceTree ignores GIT_SSH/GIT_SSH_COMMAND [closed]
Whatever I do in SourceTree 3.4.20 it is always using ssh.exe from Git and not ssh.exe from Windows and so it can not use my 1password OpenSSH agent. Everything works fine when I do it in a Windows ...
0
votes
0
answers
66
views
Git submodule checkout overwrites .git/modules/<submodule>/config
I have an extremely weird issue with git.
I have never seen it before, none of my coworkers have seen it before, but it's reproducible on my PC
The setup:
we have a main repository, project
we use ...
1
vote
1
answer
223
views
Python uv.lock and .gitignore
When using Python with uv package manager, is the uv.lock better added to .gitignore or not?
1
vote
1
answer
58
views
Cursor editor shows incorrect Git change indicators in editor gutter, but VSCode and git diff show correct changes
VSCode shows correct Git change decorations in the gutter (added/modified lines), but Cursor shows stale or incorrect Git status. Both editors are opened on the same local folder and Git itself (git ...
-5
votes
0
answers
86
views
Calculate the source code difference size between Linux kernel and Android [closed]
I've been trying to calculate the source code difference between Linux Kernel and Android, but it feels like there is a mistake.
The current result is just ~15 MiB for supposedly Android 15 of Linux ...
-7
votes
1
answer
73
views
How do I sync Hugging Face repo in Git on Windows? [closed]
With the Hugging Face Git repo on Windows 11 I failed to authenticate and sync.
Example 1:
D:\Axonura\axonura-X1>hf auth login
User is already logged in.
D:\Axonura\axonura-X1>git push
fatal: ...
3
votes
1
answer
109
views
git blame all lines matching regex
I want to obtain git blame for all lines matching particular regex, e.g. all TODO lines.
I tried git blame '-L/TODO/,+1' file.c, but it only returns the first match.
I can also do silly git blame '-L/...
0
votes
2
answers
127
views
How to perform a "totally manual" rebase? [closed]
I have implemented a huge refactoring, but a lot of commits has shown in the meantime. I need to re-apply the changes in those commits.
The problem is however, that a lot of those changes are no ...
-1
votes
2
answers
66
views
Can't find where access token is stored in codeberg repo
I created a new repo on Codeberg and cloned it to my local. I then made a change and on my first attempt to push the update it asked me for credentials. I entered my username and generated an access ...
4
votes
1
answer
108
views
get path to .git/ directory, including from a worktree
My intention is to locate the "root" .git/ directory of my current repo, meaning:
if I currently am in a worktree, I want the .git/ directory of the source repo, not the one dedicated to my ...
1
vote
2
answers
85
views
Git "objects/[0-9a-f][0-9a-f]/" is not using the first two characters of the sha1 object name [duplicate]
According to the official documentation: https://git-scm.com/docs/gitrepository-layout
objects/[0-9a-f][0-9a-f] : A newly created object is stored in its own file. The objects are splayed over 256 ...
-4
votes
0
answers
74
views
Github branches overwritten. How to revert? [duplicate]
My private repository was force-pushed by someone (possibly unauthorized) which replaced all branches with a single file and wiped out the previous code.
Someone created an SSH key in the repository ...
0
votes
2
answers
126
views
How to copy one folder from other Git branch and keep commit history? [duplicate]
We did some wrong decisions in the past and created a branch (let us call it dev2). Development continued on master branch and dev2 branch. In master branch, we renamed FolderB to FolderC. Now we ...
0
votes
0
answers
63
views
IntelliJ - After "Show history" on a specific git repo, why did the git branche panel display the list of branch of ALL repo?
I'm using IntelliJ IDEA 2025.1 (Community Edition). I have a workspace with multiple modules. Each module is linked to a specific GIT repo.
On a previous version, when I right-clicked on a module > ...
Advice
2
votes
17
replies
114
views
Is there a way to implement smart rebase when using squash merge
When doing git rebase git will drop commits already on upstream, fx:
A---B---C topic
/
D---E---A'---F main
A rebase would result in
...
1
vote
1
answer
74
views
Push notifications no longer appear in IntelliJ
IntelliJ IDEA no longer shows push status notifications. No balloon, no item in the notification panel. Commit notifications are still listed in the panel. It's inconvenient since I have to manually ...
-1
votes
0
answers
42
views
i am getting an error while trying to update git [duplicate]
$ git update-git-for-windows
Git for Windows 2.45.2.windows.1 (64-bit)
Update 2.52.0.windows.1 is available
curl: (43) A libcurl function was given a bad argument
i am facing this error while trying ...
Advice
0
votes
2
replies
53
views
Set-Alias: A positional parameter cannot be found that accepts argument 'pull'
I was trying to create an alias in PowerShell.
I am using PowerShell version 7.5.4 and used the command:
SET-ALIAS -NAME gips -VALUE git pull origin \<branch_name\>
When I ran the GET-ALIAS -...
2
votes
2
answers
109
views
git fetch origin master:master does not advance origin/master, but it does advance FETCH_HEAD
I have a situation where:
git fetch origin master:master does not update origin/master, but updates FETCH_HEAD
git fetch origin master does update origin/master
C:\xyz\tip2 [delete_unused ≡]> git ...
0
votes
0
answers
52
views
Snowflake CLI Invalid connection configuration. 250001: 250001: Could not connect to Snowflake backend after 2 attempt(s)
I am trying to run snow git execute @advanced_data_engineering_snowflake/branches/main/forums-analyes/pipeline/data/load_forums_data.sql -D "env='STAGING'" --database=COURSE_REPO --schema=...
1
vote
0
answers
88
views
Management of identical code in dissimilar repos across air-gapped systems
I am working on developing an application on an air-gapped system, and would like to be able to take changes up to an internet-connected network for distribution. There is also the possibility that ...
2
votes
1
answer
864
views
Resolving Error: fetching ref ... failed: incorrect old value provided in VS2026
When I try using the Fetch function in VS2026 I get the following error message
Error: fetching ref refs/remotes/origin/feature/GAT-161445 failed: incorrect old value provided
for some of my ...
1
vote
0
answers
219
views
Gitlab Issue: You can only push commits if the committer email is one of your own verified emails?
So I have the following repo setup in Gitlab:
Template Repo A
Project Repo B, based on Template Repo A
Project Repo C, also based on Template Repo A
Whenever some of the core files (of the Template ...
0
votes
1
answer
69
views
VSCode does not add repo to Git Desktop
I create a new project folder in VSCode:
File>Open Folder New Folder <Project 2026B> Select Folder
Click the Source control icon on left
Click Initalize Repository
Typed a comment
Click ...
Advice
0
votes
1
replies
54
views
Re-generating PAT with GitHub CLI
Is it possible to re-generate an expired Personal Access Token using the Github CLI?
I couldn't find it in the CLI documentation
0
votes
1
answer
96
views
List Git staged files relative to current directory
TL;DR
Is there a way to list only staged files (additions, modifications, and deletions) relative to the current directory without parsing the output of git status?
Other options, like git diff --name-...
Best practices
0
votes
5
replies
79
views
Git revert across branches
In our project, a new feature is committed on develop, then the branch is merged into staging, and finally merged into master.
How would you revert a commit (originally 01b59a3) which now has spread ...
3
votes
0
answers
80
views
How to make Beyond Compare work with git as a difftool in WSL2
I can get Beyond Compare to work with Git for Windows, i.e. git bash.
But when I configure the same with git inside WSL2, the command does not work. Any idea why, and how to fix this?
2
votes
2
answers
128
views
Use git filter-repo to change content of a PNG throughout history
I want to replace a PNG image some/path/image.png in a git repo with a (same-sized) other image throughout the full git history on all branches. The filename/path should remain the same, only the ...
1
vote
1
answer
95
views
Git issues with Azure DevOps Server (TFS 2018) using Visual Studio 2022 – Pull Request UI problems, deleted branches, and permissions [closed]
I’m working with Azure DevOps Server (TFS 2018, on-prem) and Visual Studio 2022, using Git repositories hosted on TFS.
I’m facing several issues that make Git hard to use reliably in this setup, ...
2
votes
3
answers
171
views
Why can't I detach an orphan's HEAD?
I'm trying to make my Git script resilient to various weird situations that can occur in repository.
I have it working correctly with detached branches and orphaned branches but it will probably not ...
1
vote
1
answer
101
views
Git - Staged Changes not showing in Android Studio
I started working on a clean local version of the master branch and created a directory and a file (special_files_release/f). This file was created with touch so it had 0 bytes. I then renamed the ...
Advice
0
votes
2
replies
102
views
Keep "duplicate" files after translation in git instead of merging them
I've got a git repository published on GitHub. It has provided a web-based tool in English language. The software was not prepared for internationalization and localization.
Another user has ...
Advice
0
votes
1
replies
61
views
Is there a way to track and verify open-source contributions beyond GitHub’s contribution graph?
I’m a CS student working on open-source projects, where much of my work (forks, private repositories, code reviews, documentation, and issue triage) doesn’t appear on GitHub’s contribution graph. Are ...
Advice
1
vote
1
replies
47
views
Can I substitute git clone with other git commands?
I've tried to substitute respective replace
git clone remote-dir/repo
with the following commands:
mkdir repo
cd repo
git init
git remote add origin remote-dir/repo
git pull
and even I got the ...
4
votes
3
answers
155
views
What should be done if Git creates and pushes an empty merge commit, and how can it be reverted?
I was merging one branch into another:
git checkout dev_auto_routing_fn
git merge developer
Git reported merge conflicts, which I resolved in the working tree.
While creating the merge commit, git ...