17,218 questions
Advice
0
votes
2
replies
59
views
Is there a way to use a custom diff algorithm in Git?
One really common issue I encounter is that Git is purely text-based, and doesn't know anything about the language of the file it's tracking. Most of my time spent resolving merge conflicts is fixing ...
0
votes
1
answer
62
views
How to filter git log by relation of the parent commit?
I want to filter the commits shown by git log --graph, so that the commits included are either reachable only by the first parent (--first-parent) [type A] or which are not reachable, whose first ...
1
vote
0
answers
62
views
How do I retain all files from different heads in a mercurial merge?
Consider the following repository example -
hg init
echo "1" > 1.txt
hg add
hg commit -m "Added 1"
echo "2" > 2.txt
hg add
hg commit -m "Added 2"
echo &...
-1
votes
3
answers
98
views
How to cut and splice two sequences of Git commits so that A-D and B-C become A-B-C-D?
We're migrating from SVN to Git using "git svn clone" followed by post-cleanup with some git-filter-repo scripts. So we're already rewriting history, and we don't need backwards interop ...
0
votes
2
answers
92
views
Safest way to resolve push conflicts and messy commit history after rebasing local branch with updated main?
I recently rebased my local feature branch onto the latest main branch to get up-to-date. Now, my commit history looks all weird—some commits seem duplicated or out of order, and when I try to push, I’...
-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
1
answer
51
views
core.filemode is true but git still not tracking executable bit
How can I force git to identify changes to the executable bit in a file? I have unset and set the core.filemode flag at the local and global levels, but permission changes to the executable bit still ...
1
vote
0
answers
20
views
How to remove a directory (from tracking) that has been deleted alread
I removed a sub-directory and all its files (rm -rf foo) in a project but hg status still shows them with '!' and I can't amend/upload because of that.
project/$ ls foo
a.c b.c Makefile
project/$ rm -...
1
vote
1
answer
53
views
How can I get other application versioncode in Kotlin?
I'm synchronizing 2 apps and what I'm trying to do right now is version control. Is there any way to get the version number and version code of another application from my own application in Kotlin? I ...
-2
votes
1
answer
209
views
How to organize messy GitHub repositories into folders or categories? [closed]
A few years ago, I learned Python, and in the latter half of the course, I also learned Git and GitHub. At that time, I pushed all my local folders to GitHub without thinking about organizing them ...
0
votes
3
answers
73
views
Git create a new branch based on master with changes from a previous master that where reverted
I made some changes on a branch, and merged it into master using a pr, later on those changes where reverted using another pr, which means that the new master with the changes reverted is ahead of the ...
3
votes
1
answer
217
views
Turning off diff decorations for git staged changes in the SCM gutter
VS Code used to only show decorations for unstaged changed lines. Recently, I've noticed that instead of staged lines' decorations being removed, they are instead rendered as dark or transparent-...
0
votes
1
answer
87
views
Source Depot (fork of Perforce). Which should I do first? `sd sync` or `sd revert`?
When working on Source Depot code, if I want to start fresh with latest version of code, should I do sd sync first? or sd revert first?
IIUC,
sd sync pulls in latest code, but ignores any files ...
1
vote
1
answer
52
views
`dvc exp show` remove workspace row
I am using the dvc tool to track experiments in my repo. When I run dvc exp show I see a table with multiple rows, each corresponding to an experimental commit based off the HEAD commit. However, I ...
2
votes
2
answers
70
views
How to get a changelog for a file on a particular branch in Mercurial
I can get the history of a file, which shows me every commit that changed that file.
I can also get a history of a particular branch and have it show me every single file change for every commit under ...