:cq!
This will force an error to Vim and it will not save any changes. Link to Vim manual.
You may want to use cq
without !
if you want vim
to exit with an error and without saving.
Related Contents:
- Vim for Windows – What do I type to save and exit from a file?
- How to modify existing, unpushed commit messages?
- Commit only part of a file in Git
- Remove file from latest commit
- How do I commit case-sensitive only filename changes in Git?
- Removing multiple files from a Git repo that have already been deleted from disk
- Link to the issue number on GitHub within a commit message
- Make the current commit the only (initial) commit in a Git repository?
- How do I push amended commit to the remote Git repository?
- Should I use past or present tense in git commit messages? [closed]
- git: Your branch is ahead by X commits
- Reset all changes after last commit in git
- Edit the root commit in Git?
- git ignore vim temporary files
- How to remove the first commit in git?
- Why does ‘git commit’ not save my changes?
- How to ‘git commit’ a single file/directory
- Viewing all `git diffs` with vimdiff
- How to save a git commit message from windows cmd?
- Git commit in terminal opens VIM, but can’t get back to terminal
- How to abort a git rebase from inside vim during interactive editing
- Git, see a list of comments of my last N commits
- Git – Remove commit from history
- How to reference the initial commit?
- How can I visualize per-character differences in a unified diff file?
- Undo git reset –hard with uncommitted files in the staging area
- How to make vi redraw screen?
- Git commit -a “untracked files”?
- Highlight changed lines and changed bytes in each changed line
- Git – Can we recover deleted commits? [duplicate]
- How can I fix git commit error “Waiting for your editor to close the file…” with VS Code?
- Can I edit two files then make one commit using GitHub Web-based editor?
- Commit only part of a file’s changes in Git
- Remove commit from history
- How to see which commit a git submodule points at
- Standard to follow when writing git commit messages [duplicate]
- Git & Intellij, How do I commit only parts of a changed file
- Git still showing deleted files after a commit
- Pull-Request for only certain files/commits
- Why am I getting “Commit failed with error: pathspec … did not match any file(s)”?
- How to commit a change in git when git commit opens Nano?
- GitHub – error: failed to push some refs to ‘git@github.com:myrepo.git’
- github changes not staged for commit
- Git prevents pushing after amending a commit
- Adding your .vim ~/.vimrc to github (aka dot files)
- How can I change the default comments in the git commit message?
- How to undo git reset –soft to get my changes back?
- Change git email for previous commits
- Pushing code from one branch of a repo to another branch of another repo
- Track file inside ignored directory