Skip to content

Add an alias to undo a commit #8

Description

@lakruzz
  • Add and alias undo that reverts the most recent commit?
  • What happens if you undo a commit that is already pushed to GitHub?
  • Can you use this command to undo a commit that isn't your own?
  • What happens if the commit you undo have two (or more) parents?
  • Add, commit and push your changes

Sometimes when you've committed your work - you instantly remember, that you forgot something.

  • You didn't add all the files!
  • You didn't put in the right commit message
  • you're simply not done.
  • ...

It would be nice to have command git undo you could run to undo the most recent commit.

Go and investigate what git command can help you to achieve this and then add the undo alias to the .gitignore file you created for your team.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions