Install the OpenSSL on Debian based systems
sudo apt-get install opensslSometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
| Using Ag (The Silver Searcher) and want ignore some specific files with CtrlP? | |
| Create a .agignore file and specify files and/or folders to ignore. |
| set nocompatible " be iMproved | |
| filetype off " required! | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| Bundle 'gmarik/vundle' | |
| Bundle 'bling/vim-airline' | |
| Bundle 'tpope/vim-fugitive' | |
| Bundle 'tpope/vim-commentary' |
| select pg_terminate_backend(procpid) from pg_stat_activity where datname='db'; |
| # Path to your oh-my-zsh configuration. | |
| ZSH=$HOME/.oh-my-zsh | |
| # Set name of the theme to load. | |
| # Look in ~/.oh-my-zsh/themes/ | |
| # Optionally, if you set this to "random", it'll load a random theme each | |
| # time that oh-my-zsh is loaded. | |
| # ZSH_THEME="robbyrussell" | |
| # ZSH_THEME="rkj-repos" | |
| ZSH_THEME="zanshin" |
| # Shows little symbol '±' if you're currently at a git repo and '○' all other times | |
| function prompt_char { | |
| git branch >/dev/null 2>/dev/null && echo '±' && return | |
| hg root >/dev/null 2>/dev/null && echo '☿' && return | |
| echo '○' | |
| } | |
| PROMPT=' | |
| %{$fg[blue]%}%n%{$reset_color%} on %{$fg[yellow]%}%m%{$reset_color%} in %{$fg[green]%}%~%b%{$reset_color%} $(hg_prompt_info)$(git_time_since_commit)$(check_git_prompt_info) | |
| ${vcs_info_msg_0_}$(prompt_char) ' |