| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://henrik.nyh.se/2008/12/git-dirty-prompt | |
| # http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
| # username@Machine ~/dev/dir [master]$ # clean working directory green | |
| # username@Machine ~/dev/dir [master*]$ # dirty working directory red* | |
| # | |
| function git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
| } | |
| # http://unix.stackexchange.com/questions/88307/escape-sequences-with-echo-e-in-different-shells | |
| function markup_git_branch { |
| Map | Action |
|---|---|
| <F1> | Causes Netrw to issue help |
| <cr> | Netrw will enter the directory or read the file |
| <del> | Netrw will attempt to remove the file/directory |
| - | Makes Netrw go up one directory |
| a | Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide) |
| c | Make browsing directory the current directory |
| C | Setting the editing window |
| d | Make a directory |
$ sudo npm install -g hexo-cli
$ hexo -v
hexo-cli: 0.1.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- ----------------- ---- | |
| Map Quick Explanation Link | |
| --- ----------------- ---- | |
| < <F1> Causes Netrw to issue help | |
| <cr> Netrw will enter the directory or read the file |netrw-cr| | |
| <del> Netrw will attempt to remove the file/directory |netrw-del| | |
| <c-h> Edit file hiding list |netrw-ctrl-h| | |
| <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| | |
| <c-r> Browse using a gvim server |netrw-ctrl-r| | |
| <c-tab> Shrink/expand a netrw/explore window |netrw-c-tab| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <!-- | |
| Noto Mono + Color Emoji Font Configuration. | |
| Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole. | |
| Usage: | |
| 0. Ensure that the Noto fonts are installed on your machine. | |
| 1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf |
Não é possível desfazer um push diretamente, como é feito com o commit utilizando o comando $ git reset --soft|mixed|hard hash-do-penultimo-commit
Para desfazer um push são necessários 3 passos:
- Utilizar o comando
$ git reset --mixed HEAD~1e em seguida utilizar o comando$ git stash(se preferir pode usar a opção-m "revertendo o push blablabla"para salvar o stash com um contexto do que foi feito - Utilizar o comando
$ git revert HEAD~0 - Utilizar o comando
$ git stash apply - Utilizar o comando
$ git push origin sua-branch -f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " source: https://stackoverflow.com/a/24046914/2571881 | |
| let s:comment_map = { | |
| \ "c": '\/\/', | |
| \ "cpp": '\/\/', | |
| \ "go": '\/\/', | |
| \ "java": '\/\/', | |
| \ "javascript": '\/\/', | |
| \ "lua": '--', | |
| \ "scala": '\/\/', | |
| \ "php": '\/\/', |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Based on BMitch's answer from: | |
| # https://stackoverflow.com/questions/38946683/how-to-test-dockerignore-file | |
| # Note: will create and delete temporary file "Dockerfile.build-context" | |
| # 1. Copy to project folder where image is being built | |
| # 2. Run script | |
| # 3. You should see list of files in build context |
OlderNewer