reversing commits in git

I committed a change locally with Storyboards for iOS. I have not been able to merge them correctly with a friend of mine so I’m giving up. My changes are pretty small and I can redo them later. What I’d like to do is reverse the last commit without the storyboards and just keep my code. I tried following this:

How to undo last commit(s) in Git?

  • How do I tell github that I made all of the commits pushed from my laptop?
  • How to search (grep) across all files, in all branches, in all repos in Stash?
  • Can I treat another git user as remote?
  • Make a git deployment owned by www-data
  • Merge staging repository bare repository after push via hooks (GIT, Windows, GitStack)
  • component build not finding dependancies
  • how i interpreted this was:

    git reset --soft HEAD^
    

    after this, I did git status, and I saw all my files in green in the staging area, including the storyboards. So i wanted to unstage them (or so I thought). So I did

    git reset HEAD MainStoryboard*
    

    Then I did not see my storyboard files on git status. I didn’t see them in red either in the unstaged area which I thought was weird. So I then did

    git commit -a -c ORIG_HEAD
    

    It allowed me to change my commit message, but the commit was the same. It still commit my storyboard files. So I’m unsure of what is going on here…. Any thoughts? Thanks in advance.

  • Gitosis installation error
  • How to output git diff result side by side with code line numbers to embed in webpage?
  • How to git push to remote tracking branch with different base name?
  • How does Mercurial stack up against GIT and SVN?
  • Make git ignore rename
  • Heroku app doesn't get updated after git push heroku master
  • 2 Solutions collect form web for “reversing commits in git”

    when doing reset, try to use to separate file list from revisions

    git reset HEAD — file_list

    also use simple commit (not ammend form)

    git add your_changed_files

    git commit

    if unstaging a pattern doesn’t work, you can try the approach in “GIT: I want to unstage all files matching a certain pattern”:

    for i in `git status --porcelain | grep '^M.*MainStoryboard.*$' | sed 's/^M \+//'`; do
        git reset HEAD -- "$i"
    done
    
    Git Baby is a git and github fan, let's start git clone.