153,690 questions
-1
votes
1
answer
70
views
Git rebase automatically accepting only the current branch changes and deletions [closed]
I have the following Git tree (newest at top) with two branches, feature and master
B # Delete file Bar (HEAD, feature)
A # Change file Foo
M # A commit that I do not want (format shift related ...
Tooling
1
vote
5
replies
129
views
Is there a Java tool that increases the project version in pom.xml with each commit or push?
Let's say the project has the following versioning system: "X.X.X", where the first digit represents the major version of the project, the second digit represents the minor version, and the ...
Advice
0
votes
5
replies
68
views
How do I get file file contents for the entire project from a different branch?
I am on the main branch, and I have some changes I want to move into it in another branch called "temp". How can I move the changes into main, without making a commit?
I know I can use ...
Advice
0
votes
5
replies
66
views
Is putting tag hierarchally under a branch a bad idea?
I've seen that creating a branch hierarchical under another branch is not allowed, that is:
> git branch foo
> git branch foo/bar
fatal: cannot lock ref 'refs/heads/foo/bar': 'refs/heads/foo' ...
Tooling
3
votes
3
replies
120
views
What's your favorite Git command in 2026?
Git has lots of useful commands and features, such as cherry-pick, (interactive) rebase, bisect, replace objects, signed commits. What's your favorite command and why? What does it do that other tools ...
Tooling
0
votes
0
replies
59
views
Quickly open only modified or new files in VS Code (since last commit)?
In VS Code, Ctrl+P (workbench.action.quickOpen) lets me quickly switch between all files in the workspace.
Is there a way to:
Quickly list only modified or newly added files (since the last commit) ...
-3
votes
0
answers
87
views
Merging two diverging main branches in git and github [closed]
I had made changes in my local main branch and committed a few versions. I have two remote branches in github: an upstream which has original repository (used for pulling change), another origin for ...
-4
votes
1
answer
104
views
"git rebase master" silently fails when last commit on "master" had been removed [duplicate]
I cherry-picked a fix from a feature branch onto master successfully, and started a new feature branch B.
Only then I realized that the cherry-pick causes use of a variable that had been introduced in ...
Tooling
2
votes
2
replies
53
views
How to restrict branch creation using wildcards without overlapping specific patterns?
I am trying to set up branch protection/restriction rules to control who can create or push to specific branches. My goal is to enforce a strict naming convention where only a specific pattern is ...
-3
votes
0
answers
44
views
Windows VPS Git Remote path not found [closed]
I have a VPS with Windows on which I store a git repo. I made an SSH connection, and I can communicate from my computer (also Windows) with the VPS. But a push doesn't work because the path is wrong......
Advice
0
votes
5
replies
60
views
Backup GIT Repository Azure DevOps
For disaster recovery, my company needs backups of our ADO Git repos. My predecessor set up a backup by cloning the repos with --no-checkout option:
git clone --no-checkout {ReposURL} {...
-2
votes
1
answer
84
views
Can I create a commit branch that will "reverse" changes?
Let's say I have code in git, which I want to remove before merging to the master, but might want to use again at a future time (e.g. for debugging or something).
e.g.
public class MyClass {
private ...
Best practices
2
votes
3
replies
57
views
Is maintaining manual per-file and per-function change logs alongside Git considered a professional practice in 2026?
I’m working on a project where we already use modern version control practices:
Git with GitFlow branching
Pull requests with mandatory reviews
Conventional commit messages
CI-based checks
Despite ...
-4
votes
1
answer
112
views
chruby - kernel_require.rb cannot load such file -- uby-4.0.1 [closed]
I have a git post-commit hook written in Ruby.
#!/usr/bin/env ruby
require "git"
# ...
It works perfectly fine from the console.
However, when it's run from IntelliJ IDEA I see:
2026-02-18 ...
4
votes
2
answers
175
views
How to check if there is an update before doing git pull?
I am using a git bare repo to manage my dotfiles and it works pretty well to sync my configuration between different machines. The setup is taken from https://www.atlassian.com/git/tutorials/dotfiles, ...