Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #129 from salmccarty/salmac86/add_git_snippet
Browse files Browse the repository at this point in the history
[Hacktoberfest] Add git commit amend snippet
  • Loading branch information
rickwest authored Oct 30, 2019
2 parents 04ceff1 + bf3aef9 commit 4e7da78
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions source/snippets/git/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,21 @@ A stands for All

### Record changes to the repository

Use the given <msg> as the commit message. If multiple -m options are given, their values are concatenated as separate paragraphs.
Use the given `<msg>` as the commit message. If multiple -m options are given, their values are concatenated as separate paragraphs.

```bash
git commit -m"your commit message"
git commit -m "your commit message"
```

### Rewrite the most recent commit message

Did you mess up with your `<msg>` and need to update it before pushing it upstream?
```bash
git commit --amend
```

Then press **Enter** -> this will open your old message in your default text editor, edit the message, and save the commit.

---

## Repositories
Expand Down

0 comments on commit 4e7da78

Please sign in to comment.