Linked Questions

113 questions linked to/from How do I delete a commit from a branch?
34 votes
2 answers
32k views

I have a master branch like this.. A -- B -- C -- D -- E -- HEAD Is there any command that remove one of a old commit and retain the others, say commit C? finally it becomes like this A -- B -- D --...
Kit Ho's user avatar
  • 27.3k
20 votes
2 answers
9k views

I need a commit to no longer be in the git database of commits. I need to be able to remove commit abc123... such that git checkout abc123... returns error: pathspec 'abc123...' did not match any file(...
Ethan Reesor's user avatar
  • 2,192
16 votes
1 answer
30k views

Possible Duplicate: How can I remove a commit on github? How to delete a 'git commit' So I'm trying to remove a commit from github. It is 3 commits ago and I'm ok if all the changes are ...
Jistanidiot's user avatar
  • 57.2k
29 votes
1 answer
34k views

I accidently overwrote another developper's changes when doing a merge in git. I know how to undo the last commit, that is, my merge. My problem is that I already pushed those commits into our online ...
nha's user avatar
  • 18.1k
11 votes
2 answers
3k views

There are a few commits on a remote branch that i would like to get rid of. For example if the history looks like: A->B->C->D I would like to delete C and D to give me: A->B where B is ...
vikash dat's user avatar
  • 1,534
1 vote
1 answer
4k views

Possible Duplicate: How to delete a ‘git commit’ Knowing that this will change history, I want to remove some accidentally commits from the history of a repository. I would like all other commits ...
danijar's user avatar
  • 34.5k
5 votes
1 answer
5k views

I have committed to master branch mistakenly and unfortunately other devs have committed their changes on top of it. So I want to remove all of my commits. This is my commit list: I want to delete ...
Hesam's user avatar
  • 53.9k
-2 votes
1 answer
6k views

I am in the process of learning git. I have the following commit on a branch commit 3 commit 2 commit 1 commit 0 how can I remove commit 1 but keep commit 2 and 3 on a remote branch?
0 votes
2 answers
4k views

Possible Duplicate: How to delete a 'git commit' I am new to git and I encountered a situation which I need some help with. I cloned a remote repository to my PC, and then opened a new ...
Meir's user avatar
  • 3
2 votes
1 answer
1k views

In my history, I have 1 commit that seems to be duplicated for some reason (checked the diff and are exactly equal). $ git log pretty=oneline ... ... d21971dd55e4b4f62421b6531b3fd1e65102974d Add ...
jviotti's user avatar
  • 19.1k
0 votes
2 answers
1k views

Say I have a git log that looks like this: commit 8379fef8952c9fde4c4f8bb9b3fb5dab80a61bc9 ... commit cc6c393f707da82aa3f0753db81b148d7eddaaf1 ... commit 6668e9087e3561b7797c91730f4ac0057fa85904 ......
Jwan622's user avatar
  • 11.8k
2 votes
1 answer
287 views

I have a commit with different username. On top of that I have a commit with correct username which I want to keep. I want to delete only the first commit which has wrong username.
karthikeayan's user avatar
  • 5,092
-2 votes
2 answers
313 views

I have committed twice and have not pushed yet. How can I undo this like though I didn't do anything. I had always thought that this would reset it: git checkout master but that didn't work. I also ...
DannyD's user avatar
  • 2,931
0 votes
3 answers
163 views

I forgot to use amend commit, and I created second commit in remote branch with same name. 4effxgg ISSUE-434 f45fsfg ISSUE-434 Is any simple way how to fix that and create one commit? Thanks.
0 votes
1 answer
242 views

I cloned a sample project, but when I check git log I see there are about 15 commits. Commits 10 and 8 caused problems to the project and for now I would like to remove/ignore/skip changes made in ...
user2622247's user avatar
  • 1,089

15 30 50 per page
1
2 3 4 5
...
8