大约有 8,490 项符合查询结果(耗时:0.0123秒) [XML]
How to squash commits in git after they have been pushed?
...
At the interactive screen that opens up, replace pick with squash
at the top for all the commits that you want to squash.
Save and close the editor through esc --> :wq
Push to the remote using:
$ git push origin branch-name --force
...
Tab key == 4 spaces and auto-indent after curly braces in Vim
...
Dont use Shift + ZZ it will create .swp file. use wq.
– shas
Dec 31 '15 at 6:49
7
...
./configure : /bin/sh^M : bad interpreter [duplicate]
...ly may be a good idea. Running "find . -type f | xargs dos2unix" from the top level directory will do it for you.
– Jeff Trull
Jan 4 '14 at 16:17
2
...
How to effectively work with multiple files in Vim
...th :tabe <filepath> you can add a new tab; and with a regular :q or :wq you close a tab.
If you map :tabn and :tabp to your F7/F8 keys you can easily switch between files.
If there are not that many files or you don't have Vim 7 you can also split your screen in multiple files: :sp <filepa...
VIM Disable Automatic Newline At End Of File
... saved with new lines at the end:
vim -b file
and once in vim:
:set noeol
:wq
done.
alternatively you can open files in vim with :e ++bin file
Yet another alternative:
:set binary
:set noeol
:wq
see more details at Why do I need vim in binary mode for 'noeol' to work?
...
How to delete duplicate lines in a file without sorting it in Unix?
...licate, consecutive lines from a file:
vim -esu NONE +'g/\v^(.*)\n\1$/d' +wq
Delete duplicate, nonconsecutive and nonempty lines from a file:
vim -esu NONE +'g/\v^(.+)$\_.{-}^\1$/d' +wq
share
|
i...
How do I stop a Git commit when VI is on the screen waiting for a commit message?
...elete the entire log message and save again. This can be done with ggdG + :wq in Vim.
Have the editor exit with a non-zero exit code. In Vim, you can use :cq (quit with an error code).
It's worth noting that you can always reset your working copy to the state it was in before the commit with git r...
How to change the commit author for one specific commit?
...edit
Exit the editor (for vim, this would be pressing Esc and then typing :wq).
Once the rebase started, it would first pause at C
You would git commit --amend --author="Author Name <email@address.com>"
Then git rebase --continue
It would pause again at D
Then you would git commit --amend --au...
Vim: Creating parent directories on save
...rs()
This defines the :W command. Ideally, I'd like to have all of :w!, :wq, :wq!, :wall etc work the same, but I'm not sure if it's possible without basically reimplementing them all with custom functions.
share
...
How to display Base64 images in HTML?
...VFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9y...
