519 questions
0
votes
1
answer
83
views
Why do I still show local files from a branch after a git revert of the merge?
I am a newcomer to Git and am probably missing something basic.
My desired practice is to create a branch from main, work on a given release in that branch, and merge to main when release code is ...
-2
votes
2
answers
105
views
Reverse last commit from remote repository [duplicate]
After I merged master into my private branch, I made some mistakes in the build file. How can I remove this commit from remote?
When trying
git revert <SHA>
I get the following error message:
...
1
vote
1
answer
86
views
Is there a way to revert a merge if neither target nor source branch exist anymore?
So this is a bit silly, but yesterday I merged a branch where the target branch seems to have been deleted at some point and the source branch has been configured to be removed after a merge. I am a ...
0
votes
0
answers
32
views
gitlab backout changes from one env to another env
I have 2 feature branches A and B and three diff envs(test ,uat and prod).branch A made changes in file and commited and merged to test. Now after few days branch B made some changes to the same file ...
0
votes
3
answers
183
views
Git says my branch is ahead of origin - even after revert/reset
On a recently cloned project, I just now made an unintentional change/commit to my local main branch. (I had intended to create and check out a new feature branch for the change, but I wasn't ...
0
votes
1
answer
58
views
Handling revert commits when merging feature branches in git
We had two feature branches targeting master: feature-a and feature-b.
feature-b was temporarily merged into feature-a. That was subsequently undone with git revert -m1.
When feature-a was merged into ...
-5
votes
2
answers
209
views
What git commands can be run to detect if the last commit was a revert?
I need to detect if the last commit was a revert commit and run some appropriate steps in a GitHub Actions workflow. I'm looking for some appropriate git commands that would help me to detect a git ...
1
vote
1
answer
2k
views
Revert and delete Azure DevOps commit history?
I made a small commit and pushed it to our main branch in Azure DevOps. I realized that this commit was obsolete, as it was based on wrong assumptions and miscommunication with my colleague, who made ...
1
vote
1
answer
487
views
Git Blob_id with no path, how to erase it [duplicate]
I am not an expert with GitLab, so I am seeking help.
I have a git repository and I made the mistake to install a code inside with files bigger than 100 Mo, and I committed several times before ...
0
votes
2
answers
83
views
How can we revert particular commit in local from bunch of commits?
Requirement: Revert particular commit in local by commit ID.
Description:
I have a branch cloned in my local from some repo.
I made some changes and committed time to time (Not pushed)
E.g.
Made ...
2
votes
3
answers
1k
views
Git revert for multiple merge and commits to a particular commit state
I understand that this question has been asked multiple times, but either the scenario was a little different or I couldn't really understand it.
Basically, my git history looks something like this:
...
-1
votes
2
answers
70
views
how to push an old reseted or reverted heads
I can go back and forward in my history using git checkout heads git revert heads git reset heads
And when I do git push origin main I get Everything up-to-date and no change on remote server.
how to ...
1
vote
1
answer
62
views
Remove very old commit that added a contributor to my repo
Almost 10 years ago I was playing with a bot (waffle.io to be precise) in my repo. It pushed a single commit adding a badge and I quickly stopped using the service and the badge.
It bothers me that ...
0
votes
0
answers
45
views
How do I revert git checkout from a feature branch? [duplicate]
I'm new to git.
I generally create a new feature branch from master & then work on the task.
Recently, I executed git checkout instead of git switch when moving from master to my existing feature ...
-1
votes
1
answer
84
views
How do I git revert to a point at which my fork is both behind and ahead of the upstream?
I was working on a fork of a github project and wanted to incorporate the changes on it into my fork, so i could open a pull request. However I made some mistakes during the merge and ended up ...