How can I skip commits in git?

I have some commits that I don’t want in my project, but there’s a commit based on them which I do want in it.
This is my GitHub “Network” graph of the repository (ASCII, as I still cannot post images):

[]--[]--[_]
|        |
|        ------->|
---------->[·]--[·]--[*]

(-> means a merge)

  • Show all branches that commit A is on and commit B is not on?
  • Files added in Git Branch-A are visible in Branch-B
  • xcode, error when commiting to github repository
  • How does Git track history during a refactoring?
  • git reset --hard error: Could not parse object
  • Howt to tell emacs VC that I want a file to be managed by git not by svn when the file is under both version systems?
  • I want to delete the changes made in the two [·] commits, and base the [*] one on the [_] one above.
    I’ve tryed merging and rebasing, but they apply the changes of the unwanted commits.
    Is it possible?

    Sorry if I’m not clear, English isn’t my mother language.
    Thanks in advance.

  • Migration Fail From Bazaar To Git: fatal: Path xxx not in branch
  • Reset Git repository permission
  • Webistrano git issue
  • What is the significance of missing parameters on the 'git push' command?
  • Git Gui automatically opens repository
  • Sonar 5.0 SCM plugin unable to blame source in git sub-modules causing analysis failure
  • 3 Solutions collect form web for “How can I skip commits in git?”

    I can give you two options:

    • Interactive rebase (git rebase -i) presents you a list of commits, editing this list will change the result of the operation; lets you reorder, delete or tag these commits for miscellaneous operations. In your case, you can rebase [*]‘s branch into [_]‘s and delete the lines unwanted commits.

    • Cherrypick lets you apply the changes of a single commit into another branch. In your case, you can simply cherrypick commit [*] into [_]‘s branch.

    You could check out your _ and cherry pick the *. If you want that on a separate branch, you can branch off from _ before doing this.

    You can combine your commits by rebase and squashing the ones you dont need. May be you did not do squash and pick.

    Refere this:
    http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

    Git Baby is a git and github fan, let's start git clone.